/* Base Styles */
:root {
    --gvs-blue: #0B3C5D;
    --gvs-blue-hover: #255194;
    --gvs-gold: #F6C401;
    --gvs-gold-dark: #e6b800;
    --transition-speed: 0.3s;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    margin-top: 100px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    overflow-x: hidden;
}

main.container {
    max-width: 1140px;
}

/* Image Optimization - CRITICAL FIX */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Preserve aspect ratio for specific image types */
.navbar-brand img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.img-fluid {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Language flags - Professional & Clean */
.navbar .nav-link img[src*="flagcdn"] {
    width: 20px !important;
    height: 15px !important;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.navbar .dropdown-item img[src*="flagcdn"] {
    width: 24px !important;
    height: 18px !important;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

/* Remove any button styling from dropdown items */
.navbar .dropdown-item {
    border: none;
    background: transparent;
    text-align: left;
    padding: 0.5rem 1rem;
}

/* Fix for logo distortion */
img[alt*="logo" i],
img[alt*="Logo" i],
img[src*="logo" i] {
    object-fit: contain !important;
}

/* Fix for accreditation logos */
section[aria-label*="Accreditation"] img {
    object-fit: contain !important;
    max-height: 100px;
    width: auto !important;
    margin: 0 auto;
}

/* WhatsApp icon — fill the float so the icon's green is the entire circle
   (eliminates a color mismatch between the icon's green and the float's #25D366),
   and so any whitish edges in the source PNG get clipped by border-radius. */
.whatsapp-float img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

/* Navbar Styles */
.navbar {
    background-color: var(--gvs-blue);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: padding var(--transition-speed), box-shadow var(--transition-speed);
    padding: 1rem 0;
}

.navbar.shrink {
    padding: 0.3rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.navbar-brand {
    color: white !important;
    font-weight: 600;
    transition: transform var(--transition-speed);
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.navbar .nav-link, .navbar .dropdown-item {
    color: white !important;
    font-weight: 500;
    font-size: 1.05rem;
    transition: color var(--transition-speed);
}

.navbar .nav-link:hover, .navbar .dropdown-item:hover {
    color: var(--gvs-gold) !important;
}

.navbar .dropdown-menu {
    background-color: var(--gvs-blue-hover);
    border: none;
}

.navbar-toggler {
    border-color: white;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Language button - Yellow with EN/ES/DE + transparent SVG flag */
.navbar .nav-item.dropdown:last-child > .nav-link {
    background: var(--gvs-gold) !important;
    color: var(--gvs-blue) !important;
    border-radius: 8px;
    padding: 8px 45px 8px 15px !important;
    min-width: 90px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    position: relative;
    transition: all 0.3s ease;
    margin-left: 8px;
}

.navbar .nav-item.dropdown:last-child > .nav-link:hover {
    background: var(--gvs-gold-dark) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Button flag (SVG) - transparent background, on right side */
.navbar .nav-item.dropdown:last-child > .nav-link .flag-icon {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 28px !important;
    height: 18px !important;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    display: block;
}

/* Language dropdown - White background */
.navbar .nav-item.dropdown:last-child .dropdown-menu {
    background: white !important;
    border: 2px solid var(--gvs-blue);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 8px 0;
    min-width: 160px;
    margin-top: 8px;
}

.navbar .nav-item.dropdown:last-child .dropdown-item {
    color: var(--gvs-blue) !important;
    padding: 10px 20px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.navbar .nav-item.dropdown:last-child .dropdown-item:hover {
    background: #FFF9E6 !important;
    color: var(--gvs-blue) !important;
    padding-left: 25px;
}

/* Dropdown flag (SVG) - transparent background */
.navbar .nav-item.dropdown:last-child .dropdown-item .flag-icon-dropdown {
    width: 32px !important;
    height: 21px !important;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    display: inline-block;
    vertical-align: middle;
}

/* Active language highlight */
.navbar .nav-item.dropdown:last-child .dropdown-item button:disabled {
    background: var(--gvs-gold) !important;
    font-weight: 700;
    cursor: default;
}

/* Login hover - Keep text visible */
.navbar .nav-item.dropdown .btn-outline-warning:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: var(--gvs-gold) !important;
    border-color: var(--gvs-gold);
    transform: translateY(-2px);
}

.navbar .nav-item.dropdown .btn-outline-warning i {
    transition: transform 0.3s ease;
}

.navbar .nav-item.dropdown .btn-outline-warning:hover i {
    transform: scale(1.1);
}

/* Dropdown animation */
.navbar .dropdown-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile adjustments */
@media (max-width: 991px) {
    .navbar .nav-item.dropdown:last-child > .nav-link {
        width: 100%;
        margin: 10px 0;
    }
}

/* ===== END LANGUAGE SELECTOR ===== */

/* Footer */
.footer {
    background-color: var(--gvs-blue);
    color: white;
    padding: 20px 0;
    text-align: center;
    margin-top: 3rem;
}

/* Utility Classes */
.text-gvs-blue { color: #004fa3; }
.text-gvs-green { color: #007f5f; }
.bg-gvs-lightblue { background-color: #f0f8ff; }

/* WhatsApp Float — transparent container, the icon image carries its own
   green circle so we don't need a background or shadow on the wrapper. */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background-color: transparent;
    padding: 0;
    transition: transform var(--transition-speed);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Custom Blockquote */
.blockquote-custom {
    background-color: #f8f9fa;
    border-left: 5px solid var(--gvs-gold);
    border-radius: 6px;
    padding: 2rem;
    margin: 2rem 0;
}

/* ===== HOME PAGE STYLES ===== */

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

.hero-video, .hero-fallback {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-video { z-index: 0; }
.hero-fallback { z-index: -1; }

.hero-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        180deg,
        rgba(11, 60, 93, 0.3) 0%,
        rgba(11, 60, 93, 0.6) 50%,
        rgba(11, 60, 93, 0.85) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: white;
}

.hero-tagline {
    font-size: 0.85rem;
    letter-spacing: 3px;
    opacity: 0.9;
}

.hero-title, .hero-subtitle {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-btn {
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.letter-spacing-wide {
    letter-spacing: 3px;
}

/* Stats Bar */
.stats-bar {
    background: var(--gvs-blue);
    color: white;
}

.stat-item {
    padding: 0.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.1;
    display: inline;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.85;
    font-weight: 500;
}

/* Program Cards */
.program-card {
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    cursor: pointer;
    border-radius: 1rem;
    overflow: hidden;
}

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

.program-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 250px;
    background: #f0f0f0;
}

.program-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-speed);
    padding: 1rem;
}

.program-card:hover .program-image-wrapper img {
    transform: scale(1.05);
}

.program-age-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--gvs-gold);
    color: #000;
    padding: 0.5rem 1rem;
    font-weight: bold;
    z-index: 2;
}

/* Why GVS Section */
.why-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    height: 100%;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.why-card:hover {
    border-color: var(--gvs-gold);
    box-shadow: 0 8px 24px rgba(11, 60, 93, 0.1);
    transform: translateY(-4px);
}

.why-icon-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--gvs-blue), var(--gvs-blue-hover));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

/* Campus Life Gallery */
.campus-gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
    height: 300px;
    cursor: pointer;
}

.campus-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.campus-gallery-item:hover img {
    transform: scale(1.08);
}

.campus-gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    transition: padding 0.3s ease;
}

.campus-gallery-item:hover .campus-gallery-overlay {
    padding-bottom: 1.5rem;
}

/* Accreditations Section */
.accreditations-section {
    background: #f8f9fa;
}

.accreditation-item {
    padding: 1rem;
    transition: transform 0.3s ease;
}

.accreditation-item:hover {
    transform: translateY(-4px);
}

.accreditation-icon-wrapper {
    height: 80px;
    width: 80px;
    margin: 0 auto;
    background: transparent;   /* logos float on the page bg, no white circle */
    display: flex;
    align-items: center;
    justify-content: center;
}

.accreditation-icon-wrapper img {
    max-height: 55px;
    max-width: 70px;            /* clamps wide logos (e.g. MEP) so they don't overflow */
    width: auto;
    height: auto;
    object-fit: contain !important;
    filter: none;
}

.accreditation-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gvs-blue);
    line-height: 1.3;
}

/* Campuses Section */
.campuses-section {
    background: var(--gvs-blue);
}

.campus-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.campus-card:hover {
    transform: translateY(-6px);
}

.campus-card-image {
    height: 280px;
    overflow: hidden;
}

.campus-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.campus-card:hover .campus-card-image img {
    transform: scale(1.05);
}

.campus-card-body {
    padding: 1.75rem;
}

/* Testimonials */
.testimonial-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.testimonial-quote-mark {
    color: var(--gvs-gold);
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--gvs-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-weight: bold;
}

/* News & Events Section */
.news-date-badge {
    width: 55px;
    height: 55px;
    border-radius: 0.75rem;
    background: var(--gvs-blue);
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.news-day {
    font-size: 1.25rem;
    font-weight: 800;
}

.news-month {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    opacity: 0.85;
}

.event-item {
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: white;
    border: 1px solid #eee;
    transition: border-color 0.3s ease;
}

.event-item:hover {
    border-color: var(--gvs-gold);
}

.event-date-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gvs-gold);
    color: var(--gvs-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--gvs-blue) 0%, #1a5a8a 100%);
}

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-bounce {
    animation: bounce 2s infinite ease-in-out;
}

/* No global rule on lazy images — was painting #f0f0f0 behind every PNG and
   showing through transparent logos. Browsers handle the loading state fine
   without a placeholder color, and forcing min-height distorted small logos. */

/* Responsive Design */
/* Small desktop / 14" laptop — tighten navbar so brand + links don't overlap */
@media (min-width: 992px) and (max-width: 1399px) {
    .navbar .nav-link, .navbar .dropdown-item {
        font-size: 0.88rem;
        padding-left: 0.4rem !important;
        padding-right: 0.4rem !important;
    }
    .navbar-brand {
        font-size: 0.95rem;
    }
}

/* Tablet and mobile - Thinner navbar */
@media (max-width: 991px) {
    .navbar {
        padding: 0.3rem 0 !important;
    }

    .navbar.shrink {
        padding: 0.2rem 0 !important;
    }

    .navbar-brand {
        font-size: 0.95rem;
    }

    .navbar-brand img {
        width: 38px !important;
        height: 38px !important;
    }

    /* Reduce hamburger button size */
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }

    body {
        margin-top: 60px;
    }

    main.container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .container {
        max-width: 100%;
        overflow-x: hidden;
    }

    h1, h2, h3, h4, h5, h6, p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0.25rem 0 !important;
    }

    body {
        margin-top: 55px;
    }

    .display-1 { font-size: 2.25rem; }
    .display-2 { font-size: 2rem; }
    .display-4 { font-size: 1.75rem; }
    .display-5 { font-size: 1.5rem; }
    .hero-section { min-height: 500px !important; }
    .hero-tagline { font-size: 0.7rem; letter-spacing: 2px; }
    .program-image-wrapper { height: 200px; }
    .campus-gallery-item { height: 250px; }
    .campus-card-image { height: 200px; }
    .stat-number { font-size: 2rem; }
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
        width: 60px;
        height: 60px;
    }
    /* Mobile sizing inherits from the desktop rule (img fills the float). */
}

@media (max-width: 576px) {
    .navbar {
        padding: 0.2rem 0 !important;
    }

    .navbar.shrink {
        padding: 0.15rem 0 !important;
    }

    .navbar-brand {
        font-size: 0.85rem;
    }

    .navbar-brand img {
        width: 32px !important;
        height: 32px !important;
    }

    .navbar-toggler {
        padding: 0.2rem 0.4rem;
        font-size: 0.9rem;
    }

    body {
        margin-top: 50px;
    }

    .hero-title { font-size: 1.75rem !important; }
    .hero-subtitle { font-size: 1rem !important; }
    .hero-tagline { font-size: 0.65rem; }

    main.container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .my-5 {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }

    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    h1, .display-4 {
        font-size: 1.75rem !important;
        line-height: 1.3;
    }

    h2, .display-5 {
        font-size: 1.5rem !important;
        line-height: 1.3;
    }

    p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .stat-number { font-size: 1.75rem; }
    .why-card { padding: 1rem; }
    .campus-gallery-item { height: 200px; }
    .campus-card-image { height: 180px; }
}


/* ── Extended spacing utilities (Bootstrap 5 stops at py-5 = 3rem) ── */
.py-6 { padding-top: 4.5rem !important; padding-bottom: 4.5rem !important; }
.py-7 { padding-top: 6rem   !important; padding-bottom: 6rem   !important; }
@media (min-width: 768px) {
    .py-md-7 { padding-top: 6rem !important; padding-bottom: 6rem !important; }
}
