/* CSS Variables */
:root {
    --primary-color: #00BFFF;
    /* Deep Sky Blue - Celeste intenso y elegante */
    --primary-dark: #009ACD;
    --secondary-color: #FFFFFF;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #F4F9FF;
    --gradient-overlay: linear-gradient(135deg, rgba(0, 191, 255, 0.9), rgba(0, 154, 205, 0.8));
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* 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;
}

.logo-text h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #222;
    letter-spacing: 1px;
}

.logo-text span {
    font-size: 0.7rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.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);
}

.btn-intranet {
    background: var(--primary-color);
    color: white !important;
    padding: 8px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
}

/* Quick Links */
.quick-links {
    background: var(--primary-color);
    padding: 40px 0;
    margin-top: -60px;
    position: relative;
    z-index: 10;
    border-radius: 0 0 50px 50px;
    box-shadow: 0 10px 30px rgba(0, 191, 255, 0.2);
}

.links-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.quick-link-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-align: center;
    gap: 15px;
    transition: var(--transition);
}

.quick-link-item:hover {
    transform: translateY(-5px);
    opacity: 0.9;
}

.icon-box {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.2);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.quick-link-item:hover .icon-box {
    background: white;
    color: var(--primary-color);
    transform: rotateY(360deg);
}

.quick-link-item h3 {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* News Section */
.news-section {
    padding: 100px 0 60px;
    background: var(--bg-light);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.news-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover .news-img img {
    transform: scale(1.1);
}

.news-date {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.news-content {
    padding: 30px;
}

.news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #222;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.news-content p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 25px;
    line-height: 1.7;
}

.read-more {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.read-more:hover {
    color: var(--primary-dark);
    gap: 12px;
}

.btn-intranet:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 191, 255, 0.3);
}

/* 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: url('images/hero-bg-new.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    padding-top: 80px;
}

/* 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 */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s 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 */
.info-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
}

.underline {
    width: 60px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.card:hover {
    transform: translateY(-10px);
    border-bottom: 4px solid var(--primary-color);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #333;
}

.card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Teaching Staff (Plana Docente) Styling */
.teachers-section {
    padding: 100px 0;
    background: white;
}

.teacher-card {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.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%;
    /* Ensure uniform height */
    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;
}

/* Mobile Carousel */
@media (max-width: 768px) {
    .carousel-slide {
        flex: 0 0 100%;
        /* 1 card visible */
    }
}

/* 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 Section */
.intranet-section {
    padding: 100px 0;
    background: white;
}

.intranet-container {
    display: flex;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    min-height: 500px;
}

.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;
    display: flex;
    align-items: center;
    padding: 40px;
}

.overlay-blue {
    background: rgba(0, 191, 255, 0.85);
    padding: 40px;
    color: white;
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.overlay-blue h3 {
    font-size: 2rem;
    font-family: 'Playfair Display', serif;
    margin-bottom: 15px;
}

.intranet-form-wrapper {
    flex: 1;
    padding: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-dark);
}

.form-header i {
    font-size: 3rem;
    margin-bottom: 10px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #eee;
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    outline: none;
    font-family: inherit;
}

.input-group input:focus {
    border-color: var(--primary-color);
    background: var(--bg-light);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.form-options a {
    color: var(--primary-color);
    font-weight: 600;
}

.message {
    text-align: center;
    margin-top: 15px;
    font-size: 0.9rem;
    height: 20px;
}

/* 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%);
    }

    .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;
    }
}