/* Import modern fonts from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* CSS Variables for Design System */
:root {
    --primary: #0A294C;        /* UCSC Navy Blue */
    --primary-light: #1E4E8C;
    --primary-rgb: 10, 41, 76;
    
    --secondary: #24b910;      /* SDA Emerald Green */
    --secondary-dark: #059669;
    --secondary-rgb: 16, 185, 129;


    
    --accent: #F59E0B;         /* Academic Amber Gold */
    --accent-rgb: 245, 158, 11;
    
    --bg-light: #F8FAFC;       /* Off-white canvas */
    --bg-white: #FFFFFF;
    --bg-dark: #0B0F19;        /* Deep space dark mode for header/footer */
    --bg-glass: rgba(255, 255, 255, 0.7);
    
    --text-primary: #0F172A;   /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --text-light: #94A3B8;     /* Slate 400 */
    --text-white: #FFFFFF;
    
    --border: #E2E8F0;
    --border-focus: #3B82F6;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-glow: 0 0 15px rgba(16, 185, 129, 0.4);
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.25;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-light);
}
::-webkit-scrollbar-thumb {
    background: var(--text-light);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Helper Layout Classes */
.container {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 64px);
}

.section-padding {
    padding: clamp(50px, 8vw, 100px) 0;
}

/* Brand Logo Bar (Top bar above navbar) */
.brand-logo-bar {
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}

.brand-logo-bar .logo-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.brand-logo-bar .logo-wrapper {
    display: flex;
    align-items: center;
    min-width: 0;
    flex: 1 1 auto;
}

.brand-logo-bar img {
    height: 52px;
    max-width: 100%;
    object-fit: contain;
    transition: var(--transition-normal);
}

.brand-logo-bar img:hover {
    transform: scale(1.03);
}

.brand-logo-bar img.sda-logo {
    height: 52px;
}

/* Dark container for UCSC Logo to make white text visible */
.brand-logo-bar .ucsc-logo-container {
    background-color: var(--primary);
    padding: 6px 16px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-logo-bar img.ucsc-logo {
    height: 60px;
}


/* Header & Navigation */
.header-nav {
    background-color: var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-tabs {
    display: flex;
    list-style: none;
    height: 100%;
}

.nav-tab-item {
    height: 100%;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0 24px;
    height: 100%;
    color: rgba(255, 255, 255, 0.85);
    font-family: var(--font-heading);
    font-weight: 500;
    position: relative;
    cursor: pointer;
}

.nav-link:hover, .nav-tab-item.active .nav-link {
    color: var(--text-white);
    background-color: rgba(255, 255, 255, 0.08);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--secondary);
    transform: scaleX(0);
    transition: var(--transition-fast);
}

.nav-tab-item.active .nav-link::after, .nav-link:hover::after {
    transform: scaleX(1);
}

/* Header Buttons */
.nav-buttons {
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-family: var(--font-heading);
    transition: var(--transition-normal);
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    gap: 8px;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--text-white);
}

.btn-primary:hover {
    background-color: var(--secondary-dark);
    box-shadow: var(--shadow-glow);
    transform: translateY(-1px);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--text-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-white:hover {
    border-color: var(--text-white);
    background-color: rgba(255, 255, 255, 0.1);
}

.btn-outline-primary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--text-white);
}

/* Hero Section */
.hero-section {
    background: radial-gradient(circle at 10% 20%, rgba(10, 41, 76, 0.97) 0%, rgba(15, 23, 42, 0.98) 90%), url('../img/bit_logo.png');
    background-repeat: no-repeat;
    background-position: right 10% center;
    background-size: 18%;
    color: var(--text-white);
    padding: clamp(60px, 10vw, 120px) 0 clamp(70px, 12vw, 140px) 0;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr minmax(340px, 420px);
    gap: clamp(24px, 4vw, 60px);
    align-items: start;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.15;
}

.hero-content h1 span {
    color: var(--secondary);
}

.hero-content h2 {
    color: var(--secondary-dark);
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    margin-bottom: 20px;
}

.hero-content p {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--text-primary);
    margin-bottom: 30px;
    max-width: 65ch;
}

.hero-actions {
    display: flex;
    gap: 16px;
}

/* The hero content sits on a light background, so the white-outline button
   (designed for dark surfaces like the header) needs dark styling here to stay visible */
.hero-actions .btn-outline-white {
    color: var(--primary);
    border-color: var(--primary);
}

.hero-actions .btn-outline-white:hover {
    background-color: var(--primary);
    color: var(--text-white);
}

/* Hero right column container */
.hero-logo-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: relative;
}

/* BIT Intake card inside fee bar */
.hero-fee-intake-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    border-left: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}

.hero-fee-intake-logo {
    width: 56px;
    height: auto;
}

.hero-fee-intake-date {
    background-color: var(--secondary);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

/* Professor profile card — right column */
.hero-prof-card {
    background: rgba(246, 246, 246, 0.793);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: float 6s ease-in-out infinite;
    width: 100%;
}

.hero-prof-card-photo {
    width: 100%;
    height: 400px;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.hero-prof-card-body {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-prof-card-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
    line-height: 1.2;
}

.hero-prof-card-creds {
    font-size: 0.95rem;
    color: var(--secondary);
    font-weight: 600;
}

.hero-prof-card-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--bg-dark);
    line-height: 1.4;
    margin-top: 4px;
}

.hero-prof-card-org {
    font-size: 1rem;
    font-weight: 700;
    color: rgb(243, 105, 0);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
}

@media (max-width: 1100px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    .hero-actions {
        justify-content: center;
    }
    .hero-logo-container {
        justify-content: center;
    }
    .hero-prof-card {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .hero-fee-bar {
        flex-direction: column;
    }
    .hero-fee-scholarship {
        max-width: none;
    }
    .hero-fee-intake-card {
        border-left: none;
        border-top: 1px solid rgba(0,0,0,0.08);
        flex-direction: row;
        justify-content: center;
    }
    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }
    .hero-actions .btn {
        width: 100%;
    }
}

/* Offerings Section */
.offerings-section {
    background-color: var(--bg-white);
}

.section-header {
    text-align: center;
    max-width: min(700px, 100%);
    margin: 0 auto 50px auto;
}

.section-header .tag {
    color: var(--secondary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 12px;
    display: block;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
}

.offerings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
    gap: clamp(16px, 2vw, 30px);
}

/* Offering Card Styles */
.offering-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 30px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.offering-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary);
    transition: var(--transition-fast);
}

.offering-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.3);
}

.offering-card:hover::before {
    background-color: var(--secondary);
    width: 6px;
}

.offering-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background-color: rgba(10, 41, 76, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: var(--transition-normal);
}

.offering-card:hover .offering-icon {
    background-color: var(--secondary);
    color: var(--text-white);
}

.offering-card h3 {
    font-size: 1.35rem;
    transition: var(--transition-fast);
}

.offering-card:hover h3 {
    color: var(--secondary-dark);
}

.offering-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex-grow: 1;
}

.offering-pathway-badge {
    background-color: rgba(245, 158, 11, 0.1);
    color: var(--accent);
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Statistics Counter Section */
.stats-section {
    background-color: var(--bg-dark);
    color: var(--text-white);
    padding: 60px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: clamp(16px, 3vw, 30px);
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

/* About & Program Structure from bit.lk */
.about-section {
    background-color: var(--bg-light);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(480px, 100%), 1fr));
    gap: clamp(30px, 5vw, 60px);
    align-items: center;
}

.about-content h2 {
    font-size: 2.25rem;
    margin-bottom: 20px;
}

.about-content p {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.about-card {
    background-color: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    box-shadow: var(--shadow-sm);
}

.about-card i {
    font-size: 2rem;
    color: var(--secondary);
}

.about-card-text h4 {
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.about-card-text p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Program Structure Timeline */
.structure-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.timeline-item {
    background-color: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: var(--transition-normal);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.timeline-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
    border-color: rgba(10, 41, 76, 0.15);
}

.timeline-badge {
    background-color: var(--secondary);
    color: var(--text-white);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(10, 41, 76, 0.2);
}

.timeline-item:nth-child(2) .timeline-badge {
    background-color: var(--secondary);
}

.timeline-item:nth-child(3) .timeline-badge {
    background-color: var(--secondary);
}

.timeline-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.timeline-details h3 {
    font-size: 1.2rem;
}

.timeline-details p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

.timeline-meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Admission section */
.admission-section {
    background-color: var(--bg-white);
}

.admission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
    gap: clamp(24px, 4vw, 50px);
}

.admission-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 40px;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: var(--transition-normal);
}

.admission-card:hover {
    box-shadow: var(--shadow-md);
}

.admission-card h3 {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admission-card h3 i {
    color: var(--secondary);
}

.admission-card ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.admission-card ul li {
    position: relative;
    padding-left: 28px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.admission-card ul li::before {
    content: '\2713'; /* Unicode checkmark */
    position: absolute;
    left: 0;
    top: 0;
    color: var(--secondary);
    font-weight: 700;
    font-size: 1.1rem;
}

.admission-card .alt-pathway {
    background-color: rgba(245, 158, 11, 0.06);
    border: 1px dashed rgba(245, 158, 11, 0.3);
    padding: 16px;
    border-radius: var(--radius-sm);
    margin-top: auto;
}

.admission-card .alt-pathway h4 {
    color: var(--accent);
    font-size: 1rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admission-card .alt-pathway p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Call to Action & Embedded Registration Form */
.cta-section {
    background: radial-gradient(circle at top left, var(--primary) 0%, var(--bg-dark) 100%);
    color: var(--text-white);
    position: relative;
    overflow: hidden;
}

.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
    gap: clamp(30px, 5vw, 60px);
    align-items: center;
}

.cta-content h2 {
    color: var(--text-white);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-content p {
    color: var(--text-light);
    margin-bottom: 30px;
}

.cta-points {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 30px;
}

.cta-point-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cta-point-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

.cta-point-text {
    font-size: 1rem;
    font-weight: 500;
}

/* Registration Form Card styling */
.registration-form-card {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-xl);
}

@media (max-width: 576px) {
    .registration-form-card {
        padding: 24px;
    }
}

.registration-form-card h3 {
    color: var(--text-white);
    font-size: 1.75rem;
    margin-bottom: 6px;
}

.registration-form-card p.form-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

/* Dynamic form layout */
.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
    gap: 20px;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: var(--text-white);
    text-transform: uppercase;
}

.form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-white);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition-fast);
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary);
    background-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Select option styling inside dark inputs */
.form-control option {
    background-color: var(--bg-dark);
    color: var(--text-white);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Invalid inputs */
.form-group.has-error .form-control {
    border-color: #EF4444;
}

.form-error-msg {
    color: #F87171;
    font-size: 0.75rem;
    font-weight: 600;
    display: none;
}

.form-group.has-error .form-error-msg {
    display: block;
}

.btn-submit {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    font-size: 1rem;
}

/* Form success message overlay */
.form-success-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 0;
    gap: 16px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.form-success-overlay h4 {
    color: var(--text-white);
    font-size: 1.5rem;
}

.form-success-overlay p {
    color: var(--text-light);
    font-size: 0.95rem;
    max-width: 320px;
}

/* FAQs Accordion Section */
.faq-section {
    background-color: var(--bg-white);
}

.faq-container {
    max-width: min(800px, 100%);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background-color: var(--bg-light);
    overflow: hidden;
    transition: var(--transition-fast);
}

.faq-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--primary);
    transition: var(--transition-fast);
    user-select: none;
}

.faq-header:hover {
    background-color: rgba(10, 41, 76, 0.02);
}

.faq-icon-arrow {
    transition: var(--transition-normal);
    font-size: 1.2rem;
    font-weight: 700;
    display: inline-block;
}

.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal) ease;
}

.faq-content-inner {
    padding: 0 24px 24px 24px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-top: 1px solid transparent;
}

/* Active FAQ styling */
.faq-item.active {
    border-color: rgba(10, 41, 76, 0.15);
    background-color: var(--bg-white);
    box-shadow: var(--shadow-md);
}

.faq-item.active .faq-header {
    color: var(--secondary-dark);
}

.faq-item.active .faq-icon-arrow {
    transform: rotate(180deg);
}

.faq-item.active .faq-content-inner {
    border-top-color: var(--border);
}

/* Coming Soon Tab Screen */
.coming-soon-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px;
    background-color: var(--bg-white);
    min-height: 500px;
    gap: 24px;
}

.coming-soon-badge {
    background-color: rgba(10, 41, 76, 0.05);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.coming-soon-screen h2 {
    font-size: 3rem;
    max-width: 600px;
}

.coming-soon-screen p {
    color: var(--text-secondary);
    max-width: 450px;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

/* Footer styling */
footer {
    background-color: var(--bg-dark);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer-top {
    padding: 70px 0 50px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: clamp(24px, 3vw, 40px);
}

.footer-logo-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-logo-col p {
    margin-bottom: 12px;
}

.footer-logo-col .footer-logos {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-logo-col .footer-logos img {
    height: 36px;
    max-width: 100%;
    opacity: 0.6;
}

.footer-col h4 {
    color: var(--text-white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 30px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links li a:hover {
    color: var(--text-white);
    padding-left: 4px;
}

.footer-contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-contact-item {
    display: flex;
    gap: 12px;
}

.footer-contact-item i {
    color: var(--secondary);
    font-size: 1.1rem;
    margin-top: 3px;
}

.footer-bottom {
    padding: 24px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.8rem;
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.footer-social-icon:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
}

/* Modal Registration styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content-box {
    background: var(--bg-dark);
    width: 100%;
    max-width: 550px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content-box {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.modal-close-btn:hover {
    color: var(--text-white);
}

/* Course selection screen (registration flow, step 2) */
.course-select-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 16px;
}

.course-select-name {
    color: var(--text-white);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.course-select-price {
    color: var(--secondary);
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 14px;
}

.course-select-plan-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-top: 1px dashed rgba(255, 255, 255, 0.08);
    color: var(--text-light);
    font-size: 0.82rem;
}

.course-select-btn {
    width: 100%;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.course-select-enrolled-badge {
    width: 100%;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: var(--radius-md);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.9rem;
}

.course-select-error {
    color: #F87171;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.2);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    font-size: 0.85rem;
    text-align: center;
}

/* Global Font Awesome Icons styling placeholder */
.icon-box i {
    font-style: normal;
}

/* Fees & Payments Section Styles */
.payments-section {
    background-color: var(--bg-white);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
}

.payments-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

@media (max-width: 800px) {
    .payments-grid {
        grid-template-columns: 1fr;
    }
}

.payment-card {
    background-color: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: var(--transition-normal);
    position: relative;
    box-shadow: var(--shadow-sm);
}

.payment-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(10, 41, 76, 0.15);
}

.payment-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: var(--transition-normal);
}

.payment-card:hover::before {
    background-color: var(--secondary);
}

.payment-card-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background-color: rgba(10, 41, 76, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.payment-card:hover .payment-card-icon {
    background-color: var(--secondary);
    color: var(--text-white);
}

.payment-card h3 {
    font-size: 1.35rem;
    color: var(--primary);
}

.payment-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    flex-grow: 1;
}

.payment-badge {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--secondary-dark);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-full);
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.payment-btn {
    align-self: flex-start;
    margin-top: 10px;
}

/* =========================================================
   SECTION NAV (in-page jump links)
   ========================================================= */
.section-nav {
    background: var(--primary);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    position: sticky;
    top: 0;
    z-index: 900;
}

.section-nav-bar {
    display: flex;
    align-items: center;
    gap: 4px;
}

.section-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    padding: 12px 4px;
    cursor: pointer;
    flex-shrink: 0;
}

.section-nav-inner {
    display: flex;
    align-items: center;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.section-nav-inner::-webkit-scrollbar { display: none; }

.section-nav-link {
    flex-shrink: 0;
    color: rgba(255,255,255,0.72);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    padding: 12px 18px;
    border-bottom: 3px solid transparent;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.section-nav-link:hover {
    color: #fff;
    border-bottom-color: rgba(255,255,255,0.4);
}

.section-nav-link.active {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* =========================================================
   HERO FEE BAR
   ========================================================= */
.hero-fee-bar {
    display: flex;
    align-items: stretch;
    gap: 0;
    background: var(--bg-white);
    border: 2px solid var(--secondary);
    border-radius: var(--radius-md);
    margin-bottom: 28px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(16,185,129,0.15);
}

.hero-fee-main {
    flex: 1;
    padding: 16px 22px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hero-fee-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--secondary-dark);
}

.hero-fee-amount {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.hero-fee-amount span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.hero-fee-installment {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.hero-fee-installment i {
    color: var(--secondary);
}

.hero-fee-scholarship {
    background: var(--secondary);
    padding: 16px 20px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 220px;
}

.hero-fee-scholarship i {
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

.hero-fee-scholarship div {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hero-fee-scholarship strong {
    font-size: 0.82rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
}

.hero-fee-scholarship span {
    font-size: 0.72rem;
    font-weight: 600;
    color: rgb(0, 0, 0);
    line-height: 1.3;
}

.hero-fee-divider { display: none; }
.hero-fee-item { display: none; }

/* =========================================================
   TWO-COLUMN GRID (used in Who Should Apply + Training sections)
   ========================================================= */
.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

/* =========================================================
   SECTION NAV — stick below header (64px), not on top of it
   ========================================================= */
.section-nav {
    top: 64px;
    z-index: 90;
}

/* =========================================================
   RESPONSIVE BREAKPOINTS
   ========================================================= */

/* ---- Tablet: 900px ---- */
@media (max-width: 900px) {
    .section-header h2 {
        font-size: 2rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .admission-card {
        padding: 28px;
    }
}

/* ---- Mobile: 768px (widened to 800px for boundary safety on 768px devices like iPad portrait) ---- */
@media (max-width: 800px) {

    /* Logo bar: width-cap the wide SDA wordmark logo so it can't overflow */
    .brand-logo-bar img.sda-logo {
        height: auto;
        max-width: 180px;
    }

    .brand-logo-bar img.ucsc-logo {
        height: auto;
        max-width: 200px;
    }

    /* Shrink nav tab text */
    .nav-link {
        padding: 0 14px;
        font-size: 0.85rem;
    }

    .nav-buttons {
        gap: 8px;
    }

    .nav-buttons .btn {
        padding: 8px 12px;
        font-size: 0.82rem;
        gap: 6px;
    }

    /* Section nav: collapse the tab row into a hamburger-triggered dropdown */
    .section-nav-bar {
        position: relative;
        padding: 4px 0;
    }

    .section-nav-toggle {
        display: inline-flex;
    }

    .section-nav-inner {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--primary);
        border-top: 1px solid rgba(255,255,255,0.1);
        box-shadow: var(--shadow-lg);
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        gap: 0;
    }

    .section-nav-inner.open {
        display: flex;
    }

    .section-nav-link {
        width: 100%;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .section-nav-link::after {
        display: none;
    }

    .section-nav-link.active {
        color: var(--secondary);
        background: rgba(255,255,255,0.06);
        border-left: 3px solid var(--secondary);
        padding-left: 17px;
    }

    /* Hero */
    .hero-section {
        background-size: 0%;
    }

    .hero-content h1 {
        font-size: clamp(1.7rem, 7vw, 2.4rem);
    }

    .hero-content h2 {
        font-size: clamp(1rem, 4vw, 1.4rem);
    }

    /* Hero fee bar: stack on narrow */
    .hero-fee-bar {
        flex-direction: column;
    }

    .hero-fee-scholarship {
        max-width: none;
    }

    .hero-fee-intake-card {
        border-left: none;
        border-top: 1px solid rgba(0,0,0,0.08);
        flex-direction: row;
        justify-content: center;
    }

    /* Who Should Apply + Training grids → single column */
    .two-col-grid {
        grid-template-columns: 1fr;
    }

    /* Section headers */
    .section-header h2 {
        font-size: 1.75rem;
    }

    .cta-content h2 {
        font-size: 1.75rem;
    }

    /* Footer */
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-socials {
        justify-content: center;
    }

    /* Admission cards */
    .admission-card {
        padding: 24px;
    }

    /* Coming soon */
    .coming-soon-screen h2 {
        font-size: 2rem;
    }
}

/* ---- Small mobile: 480px ---- */
@media (max-width: 480px) {

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content h2 {
        font-size: 0.95rem;
    }

    .hero-fee-amount {
        font-size: 1.3rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 12px;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .registration-form-card {
        padding: 20px 16px;
    }

    .payment-card {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .brand-logo-bar img.ucsc-logo {
        height: auto;
        max-width: 150px;
    }

    .brand-logo-bar img.sda-logo {
        height: auto;
        max-width: 110px;
    }

    .footer-logo-col .footer-logos img {
        height: auto;
        max-width: 90px;
    }

    .nav-buttons .btn {
        padding: 7px 10px;
        font-size: 0.78rem;
        gap: 5px;
    }

    /* Icon-only Student Portal button on very small screens to keep both buttons on one line */
    .nav-buttons .btn-outline-white .btn-text {
        display: none;
    }
}

