/* Custom Styles for Turkana Preparatory School */

/* Theme Colors */
:root {
    --primary: #2c5234;    /* Dark Green */
    --secondary: #f5f5dc;  /* Light Cream */
    --accent: #e9c46a;     /* Accent Color */
}

/* Page Header */
.page-header {
    position: relative;
    background: var(--primary);
    color: white;
    padding: 6rem 0;
    overflow: hidden;
}

.page-header h1 {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: 800;
    letter-spacing: -0.5px;
}

.breadcrumb {
    background: transparent;
    padding: 0.5rem 0;
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: white;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: rgba(255,255,255,0.6);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.6);
    content: "\f105";
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    padding: 0 0.5rem;
}

.shape {
    position: absolute;
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.shape-bottom {
    bottom: 0;
}

.shape-fluid-x {
    width: 100%;
}

.shape svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 150px;
}

.shape .shape-fill {
    fill: #FFFFFF;
}

/* Consistent Heading Styles */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Montserrat', 'Open Sans', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Specific heading sizes */
h1, .h1 { 
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

h2, .h2 { 
    font-size: 2rem;
    line-height: 1.25;
    margin-bottom: 1.25rem;
}

h3, .h3 { 
    font-size: 1.75rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h4, .h4 { 
    font-size: 1.5rem;
    line-height: 1.35;
}

h5, .h5 { 
    font-size: 1.25rem;
    line-height: 1.4;
}

h6, .h6 { 
    font-size: 1rem;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Section Headings */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-title span {
    position: relative;
    padding: 0 1rem;
    background: #fff;
    z-index: 1;
}

.section-title:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background: #e0e0e0;
    z-index: 0;
}

/* Text Colors */
.text-primary {
    color: var(--primary) !important;
}

.text-cream {
    color: var(--secondary) !important;
}

/* Buttons */
.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #1e3a24;
    border-color: #1e3a24;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Facility Cards */
.facility-card {
    transition: none;
    overflow: hidden;
}

.facility-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 82, 52, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

/* Ensure consistent heading alignment in cards */
.card-title {
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--primary);
}

/* Responsive heading adjustments */
@media (max-width: 991.98px) {
    h1, .h1 { font-size: 2.25rem; }
    h2, .h2 { font-size: 1.875rem; }
    h3, .h3 { font-size: 1.5rem; }
}

@media (max-width: 767.98px) {
    h1, .h1 { font-size: 2rem; }
    h2, .h2 { font-size: 1.75rem; }
    h3, .h3 { font-size: 1.375rem; }
    h4, .h4 { font-size: 1.25rem; }
}

/* Program Cards */
.program-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.program-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 82, 52, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.program-card:hover .program-overlay {
    opacity: 1;
}

/* ====================================
   Events Section
   ==================================== */
/* Event Cards */
.event-card {
    transition: all 0.3s ease;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.event-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.event-card:hover .card-img-top {
    transform: scale(1.05);
}

.event-date {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    padding: 12px 15px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    z-index: 2;
    transition: all 0.3s ease;
}

.event-card:hover .event-date {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.event-date .day {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: var(--primary);
}

.event-date .month {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
}

.event-meta {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-top: 15px;
    transition: all 0.3s ease;
}

.event-card:hover .event-meta {
    background-color: #f0f4f8;
}

/* Countdown Timer */
#countdown {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 20px 15px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.countdown-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    min-width: 50px;
    line-height: 1.2;
}

.countdown-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #6c757d;
    font-weight: 600;
}

/* Event Categories */
.event-categories .btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
    margin: 0 5px 10px 0;
    transition: all 0.3s ease;
}

.event-categories .btn-outline-primary:hover,
.event-categories .btn-outline-primary:focus,
.event-categories .btn-outline-primary.active {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 5px 15px rgba(44, 82, 52, 0.3);
}

/* Calendar View */
#event-calendar {
    min-height: 500px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    padding: 20px;
    margin-top: 30px;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .event-card .card-img-top {
        height: 180px;
    }
    
    .countdown-number {
        font-size: 20px;
    }
    
    .event-date {
        padding: 8px 12px;
    }
    
    .event-date .day {
        font-size: 20px;
    }
    
    .event-date .month {
        font-size: 12px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1e3a24;
}

/* Team Section */
.team-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px !important;
    overflow: hidden;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-card:hover .team-overlay {
    opacity: 1;
}

.team-card .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.team-card .social-links a:last-child {
    margin-right: 0;
}

.team-card .social-links a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Events & News Section */
.event-card, .news-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px !important;
    overflow: hidden;
}

.event-card:hover, .news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.event-date {
    background: var(--primary);
    border-radius: 5px;
    padding: 8px 12px;
    text-align: center;
    line-height: 1.2;
}

.event-date .h5 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.event-date small {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.news-badge {
    border-radius: 0 0 5px 0;
    font-size: 0.8rem;
    font-weight: 600;
}

.bg-primary-light {
    background-color: rgba(44, 82, 52, 0.1) !important;
    color: var(--primary) !important;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .team-card, .event-card, .news-card {
        margin-bottom: 30px;
    }
    
    .team-overlay {
        opacity: 1;
    }
}
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-slide {
    min-height: 80vh;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Section Headings */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}

.section-title span {
    position: relative;
    z-index: 1;
    padding: 0 1rem;
}

.section-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #e9ecef;
    z-index: 0;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .hero-slide {
        min-height: 60vh;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease forwards;
}

/* Icon Box */
.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Call to Action */
.cta-section {
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 82, 52, 0.9);
    z-index: 0;
}

/* Utility Classes */
.z-index-1 {
    position: relative;
    z-index: 1;
}

.rounded-lg {
    border-radius: 1rem !important;
}

.shadow-soft {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05) !important;
}
