/* CSS Variables */
:root {
    --primary-color: #00BFFF;
    /* Deep Sky Blue */
    --primary-dark: #009ACD;
    --secondary-color: #FFFFFF;
    --text-color: #2c3e50;
    /* Darker, more professional grey */
    --text-light: #7f8c8d;
    --bg-light: #f8fbfd;
    /* Very subtle cool grey/blue tint */
    --gradient-overlay: linear-gradient(135deg, rgba(0, 191, 255, 0.95), rgba(0, 154, 205, 0.85));
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.08);
    /* Softer, larger spread */
    --shadow-hover: 0 20px 50px rgba(0, 0, 0, 0.12);
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    /* iOS-like smooth curve */
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --plexus-color: rgba(255, 255, 255, 0.2);
}

/* Plexus Canvas Background */
.plexus-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Below content but above header bg */
    pointer-events: none;
    background: transparent;
}

#plexusCanvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--secondary-color);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background: transparent;
    color: var(--primary-color);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-outline:hover {
    background: white;
    color: var(--text-color);
}

.btn-full {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 14px;
}

.btn-full:hover {
    background: var(--primary-dark);
}

/* Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 80px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
}

.header-container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--primary-color);
}

.logo i {
    font-size: 2.5rem;
}

.logo-img {
    height: 60px;
    width: auto;
    /* Removed to show logo as requested */
}

.logo-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    /* Slightly larger */
    color: #2c3e50;
    letter-spacing: 0.5px;
    font-weight: 800;
}

.logo-text span {
    font-size: 0.75rem;
    color: var(--primary-color);
    /* Highlight motto */
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-color);
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 180px;
    box-shadow: 0px 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    border-radius: 15px;
    padding: 15px 0;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

/* Triangle indicator */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid white;
}

/* Invisible bridge to bridge the hover gap - Moved to transform strategy */

.dropdown-content a {
    color: var(--text-color) !important;
    padding: 10px 25px !important;
    text-decoration: none;
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-bottom: none !important;
}

.dropdown-content a:hover {
    background-color: var(--bg-light);
    color: var(--primary-color) !important;
    padding-left: 30px !important;
}

.dropdown-content a.active {
    background-color: var(--bg-light);
    color: var(--primary-color) !important;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInDown 0.3s ease forwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translate(-50%, 0);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 10px);
    }
}

.dropdown>a::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 5px;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.dropdown:hover>a::after {
    transform: rotate(180deg);
}

.btn-intranet {
    background: var(--primary-color);
    color: white !important;
    padding: 10px 24px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(0, 191, 255, 0.25);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* Quick Links */
.quick-links {
    margin-top: -80px;
    /* More overlap */
    padding: 60px 0;
    background: transparent;
    /* Remove solid bg to use independent cards?? No, let's keep strip but clear */
    /* Actually reform to floating cards style */
    background: white;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.05);
    border-radius: 30px;
    width: 90%;
    margin-left: 5%;
    position: relative;
    z-index: 20;
}

.links-grid {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    flex-wrap: wrap;
}

.quick-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-color) !important;
    /* Force dark text */
    text-align: center;
    gap: 15px;
    padding: 20px;
    border-radius: 20px;
    transition: var(--transition);
    flex: 1;
    min-width: 200px;
}

.quick-link-item:hover {
    transform: translateY(-10px);
    background: var(--bg-light);
}

.icon-box {
    font-size: 2.2rem;
    background: var(--bg-light);
    color: var(--primary-color);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 25px;
    /* Squircle */
    transition: var(--transition);
    border: none;
    box-shadow: inset 0 0 20px rgba(0, 191, 255, 0.05);
}

.quick-link-item:hover .icon-box {
    background: var(--primary-color);
    color: white;
    transform: rotate(15deg) scale(1.1);
    box-shadow: 0 10px 20px rgba(0, 191, 255, 0.3);
}

.quick-link-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #444;
}

/* News Section */
.news-section {
    padding: 100px 0 60px;
    background: var(--bg-light);
}

.fb-post-embed {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    width: 350px;
    /* Base width */
    max-width: 100%;
}

.fb-post-embed iframe {
    width: 100%;
    min-height: 500px;
}

.btn-intranet:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 191, 255, 0.4);
    color: white !important;
}

/* Mobile Burger */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    height: 85vh;
    /* Reduced from 100vh */
    background: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

/* #home Specifics Updated - "Premium Animated" */
/* #home Specifics Updated - "Professional Dynamic" */
/* #home Specifics Updated - "Banner Image Mode" */
/* #home Specifics Updated - "Banner Image Background" */
#home {
    background: #001220;
    /* Azul muy profundo institucional */
    min-height: 85vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#home .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 154, 205, 0.5), rgba(0, 0, 0, 0.7));
    z-index: 1;
}

#home .hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    max-width: 900px;
    padding: 0 20px;
}

#home h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.8rem;
    font-weight: 500;
    color: #ffffff;
    /* Blanco Puro */
    margin-bottom: 20px;
    letter-spacing: 5px;
    text-transform: uppercase;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    opacity: 0;
    animation: slideInLeft 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

#home h1 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    font-size: 5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    color: #ffffff !important;
    text-transform: uppercase;
    opacity: 1 !important;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.4);
    animation: constant-glow 3s infinite ease-in-out;
}

@keyframes constant-glow {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 40px rgba(255, 255, 255, 0.4);
        transform: scale(1);
    }

    50% {
        text-shadow: 0 0 35px rgba(255, 255, 255, 1), 0 0 60px rgba(255, 255, 255, 0.6);
        transform: scale(1.03);
    }
}

#home p {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-style: italic;
    font-weight: 500;
    color: #ffffff;
    margin: 0 auto;
    max-width: 800px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    opacity: 0;
    animation: slogan-pulse 4s infinite ease-in-out 1.5s;
}

/* New Animations */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slogan-pulse {

    0%,
    100% {
        opacity: 0.7;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }
}

/* Tablet/Mobile sizing */
@media (max-width: 768px) {
    #home h1 {
        font-size: 3rem;
    }

    #home h2 {
        font-size: 1rem;
        letter-spacing: 3px;
    }

    #home p {
        font-size: 1.2rem;
    }
}


/* Specific Heroes for Levels */
.level-hero {
    height: 60vh;
    /* Shorter for subpages */
}

.hero-inicial {
    background-image: url('images/inicial-bg-final.jpg');
    height: 60vh;
    /* Restored to original size */
}

.hero-primaria {
    background-image: url('images/primaria-bg-final.jpg');
}

.hero-secundaria {
    background-image: url('images/secundaria-bg-final.jpg');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 191, 255, 0.4), rgba(0, 191, 255, 0.6));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 700px;
    /* Reduced from 800px */
    padding: 0 20px;
}

.hero h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 10px;
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Split Content (Text + Image) */
.split-content {
    display: flex;
    align-items: center;
    gap: 50px;
    margin-top: 50px;
}

.split-content .text-col {
    flex: 1;
}

.split-content .img-col {
    flex: 1;
}

.split-content .img-col img {
    width: 100%;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: transform 0.5s ease;
}

.split-content .img-col img:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Slider Styles */
.slider-container {
    width: 100%;
    max-width: 80%;
    /* Reduced size */
    margin: 0 auto;
    /* Center the slider */
    position: relative;
    border-radius: 15px;
    box-shadow: var(--shadow);
    overflow: hidden;
    /* Aspect ratio for the container to prevent jumps. 
       Adjust padding-bottom based on image aspect ratio (e.g., 66.66% for 3:2) 
       or use a fixed height if images are consistent. 
       Here we use a simpler approach with stacking */
    display: grid;
    grid-template-areas: "slide";
}

.slide {
    grid-area: slide;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    /* Ensure only one occupies space structurally if needed, 
       but grid overlap handles this well */
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
}

.split-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.feature-list {
    margin-top: 20px;
}

.feature-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.feature-list li i {
    color: var(--primary-color);
}

/* Animations */
/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 191, 255, 0.4);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(0, 191, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(0, 191, 255, 0);
    }
}

.animate-up {
    opacity: 0;
    /* JS handles visibility */
    animation: fadeInUp 1s cubic-bezier(0.215, 0.610, 0.355, 1.000) forwards;
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    animation-delay: 0.2s;
    transition-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
    transition-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
    transition-delay: 0.6s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Info Section Cards */
.info-section {
    padding: 100px 0;
    background: white;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.card {
    background: white;
    padding: 50px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-color);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    transition: var(--transition);
}

.card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--text-color);
    font-weight: 700;
}

.card p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
}

/* Identity Cards Premium Styling */
.identity-section .section-title {
    margin-bottom: 50px;
}

.identity-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 40px 30px;
    height: 100%;
}

.identity-card .card-icon {
    margin-bottom: 20px;
    background: var(--bg-light);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin-left: auto;
    margin-right: auto;
}

.identity-card:nth-child(1) .card-icon {
    color: #FFD700;
}

/* Gold for Mission */
.identity-card:nth-child(2) .card-icon {
    color: #00BFFF;
}

/* Blue for Vision */
.identity-card:nth-child(3) .card-icon {
    color: #FF4500;
}

/* Orange/Red for Values */

.values-list {
    text-align: left;
    margin-top: 20px;
}

.values-list li {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: var(--text-light);
}

.values-list li i {
    margin-top: 4px;
    color: var(--primary-color);
    font-size: 1rem;
}

.values-list li strong {
    color: var(--text-color);
    display: block;
}

/* Flip Card - restore base styles but keep improved look */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    padding: 0;
    border: none;
    box-shadow: none;
    height: 350px;
    /* Taller */
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy flip */
    transform-style: preserve-3d;
    box-shadow: var(--shadow-soft);
    border-radius: 20px;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: white;
}

/* Front Style (same as original card) */
.flip-card-front {
    background-color: white;
}

/* Back Style */
.flip-card-back {
    background-color: var(--primary-color);
    color: white;
    transform: rotateY(180deg);
    padding: 0;
    /* Remove padding to let image fill full space */
    overflow: hidden;
}

.flip-card-back img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
}

/* Teaching Staff (Plana Docente) Styling */
.teachers-section {
    padding: 100px 0;
    background: white;
}

.teacher-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Teacher Card & Flip Animation */
.flip-card {
    background-color: transparent;
    width: 100%;
    height: 350px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft);
}

.flip-card-front {
    background-color: white;
    color: var(--text-color);
}

.flip-card-back {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    transform: rotateY(180deg);
    padding: 20px;
}

.teacher-img {
    width: 100px;
    height: 100px;
    background: var(--bg-light);
    border-radius: 50%;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    border: 3px solid var(--primary-color);
}

.teacher-card .role {
    color: var(--primary-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 15px;
}

.btn-profile {
    margin-top: 15px;
    padding: 8px 20px;
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: var(--transition);
}

/* Carousel Styles */
.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 30px;
}

.carousel-slide {
    flex: 0 0 calc(33.333% - 20px);
    /* 3 cards visible minus gap adjustment */
    max-width: 350px;
}

.teacher-card {
    height: 100%;
    width: 100%;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 191, 255, 0.8);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.carousel-button:hover {
    background: var(--primary-dark);
}

.carousel-button--left {
    left: 0;
}

.carousel-button--right {
    right: 0;
}

/* Filter Tabs */
.filter-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 40px;
}

.filter-btn {
    padding: 10px 20px;
    border-radius: 30px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.3);
}

/* Teachers Grid */
.teachers-grid-wrapper {
    width: 100%;
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
    list-style: none;
    padding: 0;
}

.grid-item {
    width: 100%;
}

/* Mobile Adjustments for Grid */
@media (max-width: 768px) {
    .teachers-grid {
        grid-template-columns: 1fr;
    }

    .carousel-slide {
        flex: 0 0 100%;
    }
}

/* CTA Section */
.cta-section {
    background: var(--primary-dark);
    color: white;
    text-align: center;
    padding: 80px 0;
}

.cta-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.cta-section .btn {
    background: white;
    color: var(--primary-dark);
    border-color: white;
}

.cta-section .btn:hover {
    background: transparent;
    color: white;
}


/* Intranet Modernization - Compact */
.intranet-section {
    padding: 60px 0;
    /* Reduced from 120px */
    background: linear-gradient(180deg, white 0%, var(--bg-light) 100%);
}

.intranet-container {
    display: flex;
    background: white;
    border-radius: 20px;
    /* Slightly tighter radius */
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    min-height: 400px;
    /* Reduced from 550px */
    border: 1px solid rgba(0, 0, 0, 0.02);
    max-width: 900px;
    /* Limit width */
    margin: 0 auto;
    /* Center it */
}

.intranet-image {
    flex: 1;
    background: url('https://images.unsplash.com/photo-1427504743045-caf693249480?ixlib=rb-1.2.1&auto=format&fit=crop&w=1350&q=80') no-repeat center center/cover;
    position: relative;
    padding: 30px;
    /* Reduced */
    display: flex;
    align-items: center;
    /* Centered Vertically (was flex-end) */
    justify-content: center;
    /* Centered Horizontally */
}

.overlay-blue {
    background: rgba(0, 191, 255, 0.9);
    padding: 25px;
    /* Reduced */
    color: white;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    width: 100%;
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.8s 0.2s forwards;
    text-align: center;
    /* Ensure text inside is centered */
}

.intranet-form-wrapper {
    flex: 1;
    padding: 40px 40px;
    /* Reduced from 80px 60px */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header i {
    font-size: 2.5rem;
    /* Reduced from 4rem */
    margin-bottom: 15px;
    color: var(--primary-color);
    background: var(--bg-light);
    padding: 15px;
    border-radius: 50%;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.input-group {
    margin-bottom: 20px;
    /* Reduced */
    position: relative;
    /* Essential for absolute icon positioning */
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px 12px 55px;
    /* Increased to avoids text overlap with icon */
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
    background: #fcfcfc;
}

.input-group i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 15px;
    /* Adjust as needed */
    color: #bbb;
    transition: var(--transition);
    pointer-events: none;
    /* Ensure clicks pass through to input */
}

#home h1 {
    font-family: 'Playfair Display', serif;
    font-size: 4.5rem;
    /* Big impact */
    background: -webkit-linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    /* Fix lint */
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: none;
}

/* News Section Polishing */
.news-section {
    padding: 100px 0 60px;
    background: var(--bg-light);
}

.fb-post-embed {
    background: white;
    border-radius: 20px;
    /* Match new theme */
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    width: 350px;
    max-width: 100%;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.fb-post-embed:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* Re-adding base input styles with corrected padding */
.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 15px 12px 70px !important;
    /* Force space for icon */
    border: 2px solid #f0f0f0;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
    background: #fcfcfc;
    appearance: none;
    /* Remove browser default arrow/styling */
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Specific fix for select in some browsers */
.input-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(0, 191, 255, 0.1);
}

.input-group:focus-within i {
    color: var(--primary-color);
}

.btn-full {
    border-radius: 12px;
    padding: 18px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    box-shadow: 0 10px 20px rgba(0, 191, 255, 0.3);
    font-size: 1.1rem;
    margin-top: 10px;
    transition: var(--transition);
}

.btn-full:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 191, 255, 0.4);
}


/* Footer */
footer {
    background: #222;
    color: white;
    padding: 70px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h3 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-col ul li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #aaa;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    background: #111;
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background: white;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        transform: translateX(100%);
        transition: transform 0.3s ease-in;
        justify-content: center;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.nav-active {
        transform: translateX(0%);
    }

    .dropdown-content {
        position: static;
        display: block;
        box-shadow: none;
        background: transparent;
        padding: 0 0 0 20px;
        transform: none;
        border: none;
        backdrop-filter: none;
        animation: none;
        min-width: unset;
    }

    .dropdown-content::before {
        display: none;
    }

    .dropdown>a::after {
        display: none;
    }

    .dropdown-content a {
        padding: 8px 0 !important;
        font-size: 0.9rem;
        color: var(--text-color) !important;
    }

    .dropdown-content a:hover {
        padding-left: 10px !important;
        background: transparent;
    }

    .burger {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .info-section,
    .teachers-section,
    .cta-section,
    .intranet-section {
        padding: 50px 0;
    }

    .section-title {
        margin-bottom: 30px;
    }

    .intranet-container {
        flex-direction: column;
    }

    .intranet-image {
        min-height: 200px;
    }

    .intranet-form-wrapper {
        padding: 30px 20px;
    }

    .split-content {
        flex-direction: column;
        gap: 30px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translateY(-30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* PDF Viewer Styles */
.pdf-viewer-section {
    margin-top: 50px;
    text-align: center;
}

.pdf-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    padding: 10px;
    border-radius: 20px;
    box-shadow: var(--shadow-hover);
    border: 1px solid rgba(0, 0, 0, 0.03);
    overflow: hidden;
}

.pdf-container iframe {
    width: 100%;
    height: 700px;
    border: none;
    border-radius: 12px;
}

.pdf-header {
    margin-bottom: 20px;
}

.btn-download-pdf {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-download-pdf:hover {
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
    color: #FFF;
    box-shadow: 2px 5px 10px rgba(0, 0, 0, 0.3);
}

@media screen and (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
}

/* Hero Title Highlight - Text Stroke Effect */
.hero-title-highlight {
    -webkit-text-fill-color: #00BFFF !important;
    /* Celeste */
    -webkit-text-stroke: 1px #25d366;
    /* Más fino */
    text-shadow: 0 0 15px rgba(0, 191, 255, 0.4);
    background: none !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
    animation: text-glow 3s infinite ease-in-out;
    display: inline-block;
    padding: 0;
}

/* Sub-Director Section Styling */
.subdirector-section {
    padding: 100px 0;
    background: white;
}

.subdirector-img-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-hover);
    transition: var(--transition);
    max-width: 320px;
    margin: 0 auto;
}

.subdirector-img-card:hover {
    transform: translateY(-10px);
}

.subdirector-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.img-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    color: white;
    padding: 30px 20px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.img-badge i {
    color: #ffd700;
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.img-badge span {
    font-weight: 700;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.img-badge small {
    font-size: 0.8rem;
    opacity: 0.8;
    font-style: italic;
}

.quote-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.quote-header i {
    font-size: 3rem;
    color: rgba(0, 191, 255, 0.2);
}

.quote-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--primary-dark);
}

.subdirector-message p {
    font-size: 1.1rem;
    position: relative;
    padding-left: 20px;
    border-left: 3px solid var(--primary-color);
}

@keyframes text-glow {

    0%,
    100% {
        text-shadow: 0 0 10px rgba(0, 191, 255, 0.3);
        -webkit-text-stroke-color: #25d366;
    }

    50% {
        text-shadow: 0 0 25px rgba(175, 238, 238, 0.6);
        -webkit-text-stroke-color: #ffffff;
    }
}

/* --- MODERN TOAST SYSTEM --- */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-msg {
    min-width: 300px;
    padding: 16px 24px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    border-left: 5px solid #ccc;
    transform: translateX(120%);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: auto;
}

.toast-msg.show {
    transform: translateX(0);
}

.toast-msg.success {
    border-left-color: #10b981;
}

.toast-msg.error {
    border-left-color: #ef4444;
}

.toast-msg.info {
    border-left-color: #3b82f6;
}

.toast-icon {
    font-size: 1.25rem;
}

@media (max-width: 640px) {
    #toast-container {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
    }

    .toast-msg {
        min-width: auto;
        width: 100%;
    }
}