:root {
    --egc-navy: #0d2f5e;
    --egc-navy-dark: #081d3f;
    --egc-accent: #ffffff;
    --egc-accent-dark: #e7edf5;
    --egc-blue-light: #eaf1fb;
    --egc-light: #f5f8fc;
}

body {
    font-family: 'Poppins', sans-serif;
    color: #1c2b36;
    background-color: var(--egc-light);
}

.egc-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: #fff;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* Navbar */
.egc-navbar {
    background: linear-gradient(90deg, var(--egc-navy), var(--egc-navy-dark));
}
.egc-navbar .nav-link {
    font-weight: 500;
}
.btn-egc-accent {
    background-color: var(--egc-accent);
    border-color: var(--egc-accent);
    color: var(--egc-navy);
    font-weight: 600;
}
.btn-egc-accent:hover {
    background-color: var(--egc-accent-dark);
    border-color: var(--egc-accent-dark);
    color: var(--egc-navy);
}

/* Hero section */
.egc-hero {
    background: linear-gradient(135deg, var(--egc-navy) 0%, var(--egc-navy-dark) 100%);
    color: #fff;
    padding: 90px 0 110px;
    position: relative;
    overflow: hidden;
}
.egc-hero h1 {
    font-weight: 700;
    font-size: 2.6rem;
}
.egc-hero p.lead {
    color: #d9e6f2;
}

.egc-stat-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(11, 61, 99, 0.12);
    margin-top: -70px;
    position: relative;
    z-index: 2;
}
.egc-stat-card h3 {
    color: var(--egc-navy);
    font-weight: 700;
}

.egc-section-title {
    font-weight: 700;
    color: var(--egc-navy);
}

.text-egc-accent {
    color: #2f6fb0 !important;
}

.text-hero-accent {
    color: #9fc4f0 !important;
}

.egc-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(11, 61, 99, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}
.egc-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(11, 61, 99, 0.15);
}
.egc-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--egc-blue-light);
    color: var(--egc-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.egc-cta {
    background: var(--egc-navy);
    color: #fff;
    border-radius: 18px;
}

.egc-footer {
    background: var(--egc-navy-dark);
    color: #cdd9e4;
}
.egc-footer a {
    color: #cdd9e4;
    text-decoration: none;
}
.egc-footer a:hover {
    color: var(--egc-accent);
}

.form-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(11, 61, 99, 0.1);
}

.book-cover-placeholder {
    height: 160px;
    background: linear-gradient(135deg, var(--egc-navy), var(--egc-accent));
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2.5rem;
}
.book-cover-img {
    height: 160px;
    width: 100%;
    object-fit: cover;
    border-radius: 10px 10px 0 0;
    display: block;
}
@media (max-width: 480px) {
    .book-cover-img {
        height: 120px;
    }
}

/* Teacher carousel */
.egc-teacher-carousel {
    padding-bottom: 2.5rem;
}
.egc-teacher-carousel .carousel-item {
    padding: 0.5rem 0 1rem;
}
.teacher-photo {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--egc-blue-light);
}
.teacher-photo-placeholder {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--egc-blue-light);
    color: var(--egc-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
}
.egc-teacher-carousel .carousel-control-prev,
.egc-teacher-carousel .carousel-control-next {
    width: 5%;
}
.egc-carousel-icon {
    background-color: var(--egc-navy);
    border-radius: 50%;
    padding: 14px;
}
.egc-teacher-carousel .carousel-indicators [data-bs-target] {
    background-color: var(--egc-navy);
}

/* Announcement ticker banner */
.egc-announcement-bar {
    background: linear-gradient(90deg, #1a9c5c, #14804a);
    color: #ffffff;
    overflow: hidden;
    white-space: nowrap;
    padding: 8px 0;
}
.egc-announcement-icon {
    flex-shrink: 0;
    padding: 0 14px;
    font-size: 1rem;
    color: #ffffff;
    border-right: 1px solid rgba(255,255,255,0.35);
}
.egc-announcement-track {
    overflow: hidden;
    flex: 1;
}
.egc-announcement-content {
    display: inline-block;
    padding-left: 14px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
    animation: egc-scroll-left 26s linear infinite;
}
.egc-announcement-content span {
    display: inline-block;
}
@keyframes egc-scroll-left {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-33.333%); }
}
@media (max-width: 480px) {
    .egc-announcement-content {
        font-size: 0.8rem;
        animation-duration: 20s;
    }
    .egc-announcement-icon {
        padding: 0 10px;
    }
}

/* Floating WhatsApp button */
.egc-whatsapp-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background-color: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    z-index: 1050;
    text-decoration: none;
    transition: transform 0.15s ease;
}
.egc-whatsapp-btn:hover {
    color: #fff;
    transform: scale(1.08);
}
@media (max-width: 480px) {
    .egc-whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
        bottom: 14px;
        right: 14px;
    }
}

/* ============================
   MOBILE RESPONSIVENESS
   90% of traffic is mobile, so these rules take priority.
   ============================ */

/* Prevent any element from causing horizontal scroll/overflow */
html, body {
    overflow-x: hidden;
}
img {
    max-width: 100%;
    height: auto;
}

/* Tablets and small screens */
@media (max-width: 768px) {
    .egc-hero {
        padding: 56px 0 90px;
        text-align: center;
    }
    .egc-hero h1 {
        font-size: 1.9rem;
    }
    .egc-hero p.lead {
        font-size: 0.95rem;
    }
    .hero-btns .btn {
        width: 100%;
    }

    .egc-stat-card {
        margin-top: -50px;
        border-radius: 12px;
    }
    .egc-stat-card h3 {
        font-size: 1.3rem;
    }

    .egc-section-title {
        font-size: 1.4rem;
        text-align: center;
    }

    .egc-cta {
        padding: 2rem 1.25rem !important;
        border-radius: 14px;
    }
    .egc-cta h3 {
        font-size: 1.3rem;
    }

    .book-cover-placeholder {
        height: 120px;
        font-size: 1.8rem;
    }

    .form-card, .egc-card {
        border-radius: 12px;
    }

    /* Tables scroll horizontally instead of squeezing/breaking layout */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
    .table-responsive table {
        min-width: 480px;
    }

    /* Navbar dropdown/menu items get more tap room */
    .egc-navbar .nav-link, .egc-navbar .dropdown-item {
        padding-top: 0.6rem;
        padding-bottom: 0.6rem;
    }

    footer .row > div {
        text-align: center;
    }
}

/* Small phones */
@media (max-width: 480px) {
    .egc-hero h1 {
        font-size: 1.6rem;
    }
    .egc-hero {
        padding: 44px 0 80px;
    }
    .egc-icon-circle {
        width: 46px;
        height: 46px;
        font-size: 1.15rem;
    }
    .form-card, .egc-card {
        padding: 1rem !important;
    }
}

/* Comfortable tap targets on touch devices */
@media (pointer: coarse) {
    .btn, .nav-link, .dropdown-item, input[type="radio"], input[type="checkbox"] {
        min-height: 38px;
    }
    input[type="radio"], input[type="checkbox"] {
        min-height: auto;
        width: 20px;
        height: 20px;
    }
}
