:root {
    --primary-color: #0056b3;
    --primary-gradient: linear-gradient(135deg, #0056b3 0%, #004494 100%);
    --accent-color: #ffc107;
    --text-dark: #1a202c;
    --text-light: #4a5568;
    --light-bg: #f7fafc;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --premium-shadow: 0 10px 30px rgba(0, 86, 179, 0.1);
    --hover-shadow: 0 20px 40px rgba(0, 86, 179, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Typography */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background: #f0f4f8;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 100px 0;
    position: relative;
}

.text-center {
    text-align: center;
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 16px;
    transition: var(--transition);
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 86, 179, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 86, 179, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

/* Glassmorphism Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 16px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f0f4f8 0%, #ffffff 100%);
    padding: 0 0 80px;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--text-dark);
    line-height: 1.2;
}

.hero p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
}

.hero-image {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 45%;
    z-index: 1;
}

/* Cards (Courses, Features) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid #eee;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card img {
    border-radius: 8px;
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    color: var(--text-dark);
}

.card p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 20px;
}

/* Footer */
footer {
    background: #1a252f;
    color: #b8c7ce;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    border-top: 1px solid #2c3e50;
    padding-top: 20px;
    font-size: 14px;
}

/* Animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Stats Grid Desktop Default */
.stats-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;
    gap: 40px;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        right: 0;
        top: 90px;
        height: calc(100vh - 90px);
        background: var(--white);
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 40px 20px;
        transition: transform 0.3s ease-in-out, visibility 0.3s;
        box-shadow: -5px 10px 15px rgba(0, 0, 0, 0.1);
        align-items: center !important;
        justify-content: flex-start;
        gap: 20px;
        text-align: center;
        transform: translateX(100%);
        visibility: hidden;
        z-index: 2000;
        /* Ensure on top */
        overflow-y: auto;
        /* Allow menu scrolling if too tall */
    }

    .nav-links.active {
        transform: translateX(0);
        /* Show */
        visibility: visible;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links .btn-admissions {
        margin: 10px auto !important;
        width: 80% !important;
        max-width: 300px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-toggle {
        display: block;
    }

    .hero {
        padding: 60px 0;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
        padding-right: 0;
    }

    /* Center all flex containers in hero (Buttons & Stats) */
    .hero-content>div[style*="display:flex"] {
        justify-content: center !important;
    }

    .hero-image {
        position: relative;
        width: 100%;
        margin-top: 40px;
        transform: none;
        display: flex;
        justify-content: center;
    }

    .hero h1 {
        font-size: 36px;
    }

    /* Footer Contact Alignment */
    .footer-contact-list {
        display: inline-block;
        text-align: left;
    }

    .footer-contact-list li {
        justify-content: flex-start !important;
    }

    /* Footer Links 2x2 Grid */
    .footer-links-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        text-align: left;
        max-width: 300px;
        margin: 0 auto;
        /* Center the grid block itself */
    }

    /* Global Mobile Centering */
    .section .text-center {
        text-align: center !important;
    }

    /* Footer Centering */
    .footer-grid {
        text-align: center;
    }

    /* Center flex containers in footer */
    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Stats Grid 2x2 on Mobile */
    .stats-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        text-align: center;
        justify-content: center;
    }

    .stats-grid .stat-item {
        width: 100%;
        min-width: 0;
    }

    .stats-grid .icon-box {
        margin-bottom: 5px !important;
    }

    .stats-grid .counter {
        font-size: 32px !important;
    }

    .stats-grid div:last-child {
        font-size: 12px !important;
    }

    /* Force Button Centering on Mobile */
    .btn,
    button,
    input[type="submit"] {
        display: inline-flex;
        margin: 10px auto;
        /* Auto margin centers block-level or flex items */
    }

    /* Ensure containers allow centering */
    div[style*="display:flex"] {
        justify-content: center !important;
        flex-wrap: wrap;
    }

    /* Specific overrides for consistent spacing */
    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Fix stats alignment */
    .stat-item {
        margin-bottom: 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Form alignment */
    /* Modern Mobile Form Styling */
    .contact-form-wrapper {
        padding: 25px !important;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1) !important;
        background: #ffffff !important;
        border-radius: 20px !important;
        border: 1px solid rgba(0, 0, 0, 0.05);
    }

    .contact-form-wrapper h3 {
        font-size: 24px;
        text-align: center;
        margin-bottom: 25px !important;
    }

    form {
        width: 100%;
    }

    form label {
        font-size: 14px;
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 8px !important;
        margin-left: 2px;
    }

    form input,
    form select,
    form textarea {
        background: #f8fafc !important;
        border: 1px solid #e2e8f0 !important;
        padding: 14px 16px !important;
        border-radius: 12px !important;
        font-size: 16px;
        /* Prevents iOS zoom */
        margin-bottom: 20px !important;
        width: 100%;
        transition: all 0.3s ease;
        appearance: none;
        /* Remove default browser styles */
        -webkit-appearance: none;
    }

    form input:focus,
    form select:focus,
    form textarea:focus {
        background: #ffffff !important;
        border-color: var(--primary-color) !important;
        box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1) !important;
        outline: none;
    }

    form button[type="submit"] {
        width: 100%;
        padding: 16px !important;
        border-radius: 12px !important;
        font-size: 16px;
        font-weight: 600;
        background: var(--primary-gradient) !important;
        color: white;
        box-shadow: 0 10px 20px rgba(0, 86, 179, 0.2);
        margin-top: 10px;
    }
}


/* Success Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.success-modal {
    background: white;
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .success-modal {
    transform: translateY(0);
    opacity: 1;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #dcfce7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: #16a34a;
    font-size: 40px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s both;
}

.success-modal h3 {
    font-size: 24px;
    color: #1a202c;
    margin-bottom: 10px;
}

.success-modal p {
    color: #4a5568;
    margin-bottom: 25px;
    line-height: 1.6;
}

.modal-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
    width: auto;
    /* Allow centering */
    min-width: 150px;
    display: inline-block;
    margin-top: 10px;
}

.modal-btn:hover {
    transform: scale(1.05);
}

@keyframes popIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Premium Form Styles */
.premium-form-card {
    background: rgba(255, 255, 255, 0.98);
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    transition: all 0.3s ease;
}

.premium-form-card:hover {
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

.form-header {
    text-align: center;
    margin-bottom: 25px;
}

.form-header h3 {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, #003366 100%);
    -webkit-background-clip: text;
    /* Standard property for compatibility */
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    /* Fallback */
    margin-bottom: 5px;
}

.form-header p {
    color: #64748b;
    font-size: 14px;
}

.styled-input-group {
    margin-bottom: 18px;
    position: relative;
    text-align: left;
}

.styled-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #475569;
    margin-bottom: 6px;
}

.styled-input {
    width: 100%;
    padding: 12px 15px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #334155;
    transition: all 0.3s ease;
    font-family: inherit;
}

.styled-input:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 86, 179, 0.1);
    outline: none;
}

.phone-group {
    display: flex;
    gap: 0;
}

.phone-select {
    width: 90px;
    border-radius: 8px 0 0 8px;
    border-right: none;
    background: #eff6ff;
    font-weight: 600;
    color: #0f172a;
}

.phone-input {
    border-radius: 0 8px 8px 0;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #004494 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.25);
    position: relative;
    overflow: hidden;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 86, 179, 0.35);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Modal specific (used in footer mostly) */
.popup-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    color: #64748b;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.popup-close-btn:hover {
    background: #fee2e2;
    color: #ef4444;
    transform: rotate(90deg);
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 768px) {
    .premium-form-card {
        padding: 25px;
        width: 100%;
    }
}

/* Restored Popup Styles */
.popup-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: popupSlideUp 0.4s ease-out;
}

@media (max-width: 768px) {
    .popup-card {
        padding: 15px;
        /* Further reduced */
        width: 90%;
        max-height: 75vh;
        /* Stricter height limit */
        overflow-y: auto;
    }

    .popup-close-btn {
        top: 8px;
        right: 8px;
        width: 26px;
        height: 26px;
        font-size: 14px;
        background: #f1f5f9;
        z-index: 20;
        /* Ensure on top */
    }

    .form-header {
        margin-bottom: 10px;
        /* Tighter */
    }

    .form-header h3 {
        font-size: 18px;
        /* Slightly smaller */
        margin-bottom: 2px;
    }

    .form-header p {
        font-size: 12px;
        line-height: 1.4;
    }

    form input,
    form select,
    form textarea {
        padding: 8px 12px !important;
        /* Compact inputs */
        margin-bottom: 10px !important;
        font-size: 13px;
        height: auto;
    }

    .submit-btn {
        padding: 12px;
        font-size: 15px;
    }

}