/* ====================================
   Sub Header Styling
   ==================================== */

/* Sub Header Container */
.sub-header {
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

/* Background Image with Overlay */
.sub-header-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0.2;
    z-index: 1;
}

.sub-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(44, 62, 80, 0.95) 0%, 
        rgba(52, 73, 94, 0.85) 100%);
    z-index: 2;
}

.sub-header .container {
    position: relative;
    z-index: 3;
}

/* Sub Header Content */
.sub-header-content {
    animation: fadeInUp 0.8s ease;
}

.sub-header-content h1 {
    color: white;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.sub-header-content h1 span {
    color: var(--secondary);
}

/* Breadcrumb Styling */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 0;
}

.breadcrumb-item {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    font-weight: 500;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.breadcrumb-item a:hover {
    color: var(--secondary);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--secondary);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.6);
    content: "›";
    font-size: 1.5rem;
    line-height: 1;
}

/* Emergency Contact Box */
.emergency-contact {
    animation: fadeInRight 0.8s ease;
    border: 2px solid rgba(52, 152, 219, 0.2);
}

.emergency-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
}

.emergency-icon i {
    font-size: 1.25rem;
}

.emergency-contact h6 {
    font-size: 1.1rem;
    font-weight: 700;
}

.emergency-contact .btn-primary {
    padding: 12px 20px;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: var(--border-radius-lg);
}

/* Page Specific Background Images */
.sub-header[data-page="about"] .sub-header-bg {
    background-image: url('../img/subheader/about-bg.jpg');
}

.sub-header[data-page="contact"] .sub-header-bg {
    background-image: url('../img/subheader/contact-bg.jpg');
}

.sub-header[data-page="courses"] .sub-header-bg {
    background-image: url('../img/subheader/courses-bg.jpg');
}

.sub-header[data-page="admission"] .sub-header-bg {
    background-image: url('../img/subheader/admission-bg.jpg');
}

.sub-header[data-page="gallery"] .sub-header-bg {
    background-image: url('../img/subheader/gallery-bg.jpg');
}

.sub-header[data-page="apply"] .sub-header-bg {
    background-image: url('../img/subheader/apply-bg.jpg');
}

/* Sub Header Page Indicator */
.page-indicator {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
}

.indicator-dot {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    border: 3px solid var(--secondary);
}

.indicator-dot i {
    color: var(--primary);
    font-size: 1.5rem;
}

/* Sub Header Animations */
@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ====================================
   Responsive Design
   ==================================== */

/* Large Desktop (1200px and above) */
@media (min-width: 1200px) {
    .sub-header {
        padding: 120px 0 100px;
    }
    
    .sub-header-content h1 {
        font-size: 4rem;
    }
}

/* Tablet Landscape (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .sub-header {
        padding: 100px 0 80px;
    }
    
    .sub-header-content h1 {
        font-size: 3.5rem;
    }
}

/* Tablet Portrait (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .sub-header {
        padding: 80px 0 60px;
    }
    
    .sub-header-content h1 {
        font-size: 3rem;
    }
    
    .emergency-contact {
        margin-top: 40px;
    }
}

/* Mobile Devices (up to 767px) */
@media (max-width: 767px) {
    .sub-header {
        padding: 60px 0 40px;
        text-align: center;
    }
    
    .sub-header-content h1 {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .breadcrumb {
        justify-content: center;
    }
    
    .breadcrumb-item {
        font-size: 1rem;
    }
    
    .emergency-contact {
        margin-top: 30px;
        max-width: 400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Small Mobile Devices (up to 575px) */
@media (max-width: 575px) {
    .sub-header {
        padding: 50px 0 30px;
    }
    
    .sub-header-content h1 {
        font-size: 2rem;
    }
    
    .breadcrumb-item {
        font-size: 0.9rem;
    }
    
    .emergency-icon {
        width: 40px;
        height: 40px;
    }
    
    .emergency-icon i {
        font-size: 1rem;
    }
    
    .emergency-contact h6 {
        font-size: 1rem;
    }
    
    .emergency-contact .btn-primary {
        font-size: 1rem;
        padding: 10px 15px;
    }
}

/* Extra Small Mobile Devices (up to 400px) */
@media (max-width: 400px) {
    .sub-header {
        padding: 40px 0 20px;
    }
    
    .sub-header-content h1 {
        font-size: 1.75rem;
    }
    
    .breadcrumb-item {
        font-size: 0.85rem;
    }
}

/* ====================================
   Alternative Sub Header Variations
   Uncomment and use as needed
   ==================================== */

/* Minimal Sub Header */
/*
.sub-header-minimal {
    padding: 60px 0 40px;
    background: var(--primary);
}

.sub-header-minimal .sub-header-bg {
    display: none;
}

.sub-header-minimal::before {
    background: var(--primary);
}
*/

/* Centered Sub Header */
/*
.sub-header-centered .sub-header-content {
    text-align: center;
}

.sub-header-centered .breadcrumb {
    justify-content: center;
}

.sub-header-centered .emergency-contact {
    margin: 40px auto 0;
    max-width: 400px;
}
*/

/* Sub Header with Pattern */
/*
.sub-header-pattern .sub-header-bg {
    background-image: url('../img/patterns/dot-pattern.png');
    opacity: 0.1;
}
*/

/* Gradient Only Sub Header */
/*
.sub-header-gradient {
    background: linear-gradient(135deg, 
        var(--primary) 0%, 
        var(--secondary) 50%, 
        var(--primary-dark) 100%);
}

.sub-header-gradient .sub-header-bg {
    display: none;
}

.sub-header-gradient::before {
    display: none;
}
*/

/* ====================================
   Utility Classes for Sub Header
   ==================================== */

.sub-header-light {
    background: linear-gradient(135deg, var(--gray-100) 0%, white 100%);
    color: var(--dark);
}

.sub-header-light .sub-header-bg {
    display: none;
}

.sub-header-light::before {
    display: none;
}

.sub-header-light h1 {
    color: var(--primary);
}

.sub-header-light .breadcrumb-item {
    color: var(--gray-600);
}

.sub-header-light .breadcrumb-item a {
    color: var(--gray-700);
}

.sub-header-light .breadcrumb-item.active {
    color: var(--secondary);
}

.sub-header-light .breadcrumb-item + .breadcrumb-item::before {
    color: var(--gray-500);
}

.sub-header-small {
    padding: 60px 0 40px;
}

.sub-header-large {
    padding: 140px 0 100px;
}

.no-bg .sub-header-bg {
    display: none;
}