/* ==========================================
   RESET & BASE STYLES
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #9b7fc4 0%, #e8d5ff 50%, #f5ebff 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ==========================================
   ACCESSIBILITY
   ========================================== */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ==========================================
   HEADER
   ========================================== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(138, 43, 226, 0.08);
    backdrop-filter: blur(10px);
    padding: 0.8rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(138, 43, 226, 0.15);
    z-index: 1200;
    box-shadow: 0 2px 20px rgba(138, 43, 226, 0.05);
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(138, 43, 226, 0.2));
}

.header-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #5B2C91;
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(138, 43, 226, 0.1);
}

.btn-login {
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, #5B2C91, #8B3A9C);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.2);
    border: none;
    cursor: pointer;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.3);
    background: linear-gradient(135deg, #6a35a8, #9c45b0);
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    padding-top: 8rem;
    position: relative;
    overflow: hidden;
    /* Enhanced Gradient Background */
    background:
        radial-gradient(circle at 15% 15%, rgba(91, 44, 145, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 85% 85%, rgba(139, 58, 156, 0.15) 0%, transparent 50%),
        linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.4) 50%, transparent 100%);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Dot Texture */
    background-image: radial-gradient(rgba(91, 44, 145, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 0%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

/* ==========================================
   TREE CONTAINER & LOGO
   ========================================== */

.tree-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-wrapper {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo {
    width: 100%;
    max-width: 750px;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 30px rgba(138, 43, 226, 0.15));
    animation: logoGlow 4s ease-in-out infinite;
    opacity: 0.85;
}

@keyframes logoGlow {

    0%,
    100% {
        filter: drop-shadow(0 10px 30px rgba(138, 43, 226, 0.15));
    }

    50% {
        filter: drop-shadow(0 15px 40px rgba(138, 43, 226, 0.25));
    }
}

/* ==========================================
   NAVIGATION BUBBLES
   ========================================== */

.tree-menu {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.bubble {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.4) 0%,
            rgba(174, 119, 225, 0.15) 25%,
            rgba(138, 43, 226, 0.08) 50%,
            rgba(255, 182, 193, 0.1) 75%,
            rgba(255, 255, 255, 0.3) 100%);
    backdrop-filter: blur(12px);
    border: 2px solid rgba(255, 255, 255, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    pointer-events: auto;
    transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
    box-shadow:
        0 8px 32px rgba(138, 43, 226, 0.15),
        inset -10px -10px 30px rgba(255, 255, 255, 0.3),
        inset 10px 10px 30px rgba(174, 119, 225, 0.1);
    animation: float 4s ease-in-out infinite;
    overflow: hidden;
    text-decoration: none;
}

/* Soap bubble shine effect */
.bubble::before {
    content: '';
    position: absolute;
    top: 15%;
    left: 20%;
    width: 45%;
    height: 45%;
    background: radial-gradient(circle at 30% 30%,
            rgba(255, 255, 255, 0.8) 0%,
            rgba(255, 255, 255, 0.4) 30%,
            transparent 70%);
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

/* Secondary smaller shine */
.bubble::after {
    content: '';
    position: absolute;
    bottom: 25%;
    right: 20%;
    width: 25%;
    height: 25%;
    background: radial-gradient(circle at 50% 50%,
            rgba(255, 255, 255, 0.6) 0%,
            rgba(255, 255, 255, 0.2) 40%,
            transparent 70%);
    border-radius: 50%;
    filter: blur(1px);
    pointer-events: none;
}

.bubble span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #5f26aa;
    text-align: center;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    padding: 0.25rem;
    z-index: 2;
}

/* Bubble Positioning */
#bubble-centro {
    top: 5%;
    left: -5%;
    animation-delay: 0s;
}

#bubble-disciplinas {
    top: 5%;
    right: -5%;
    animation-delay: 1s;
}

#bubble-convenios {
    bottom: 30%;
    left: -15%;
    animation-delay: 2s;
}

#bubble-contacto {
    bottom: 30%;
    right: -15%;
    animation-delay: 3s;
}

/* Bubble Hover Effects */
.bubble:hover {
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(174, 119, 225, 0.25) 25%,
            rgba(138, 43, 226, 0.15) 50%,
            rgba(255, 182, 193, 0.2) 75%,
            rgba(255, 255, 255, 0.4) 100%);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow:
        0 12px 40px rgba(138, 43, 226, 0.25),
        inset -15px -15px 40px rgba(255, 255, 255, 0.4),
        inset 15px 15px 40px rgba(174, 119, 225, 0.2);
}

.bubble:focus {
    outline: 3px solid rgba(138, 43, 226, 0.6);
    outline-offset: 4px;
}

.bubble:active {
    transform: scale(0.98);
}

/* Float Animation */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }
}

/* ==========================================
   CONTENT SECTIONS
   ========================================== */

.content-section {
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.content-section:nth-child(even) {
    background: rgba(255, 255, 255, 0.15);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #5B2C91;
    text-align: center;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(138, 43, 226, 0.1);
}

.section-description {
    font-size: 1.1rem;
    color: #4a148c;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* ==========================================
   CAROUSEL STYLES
   ========================================== */


.carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(91, 44, 145, 0.25);
    /* background: #000; Removed to suit glassmorphism better */
}

/* NEWS CAROUSEL STYLES MOVED TO embla-news.css */
/*
#newsCarousel.embla {
    position: relative;
    overflow: visible;
    max-width: 500px;
    padding: 80px 20px;
    margin: 0 auto;
}

#newsCarousel .embla__viewport {
    overflow: hidden;
    width: 100%;
    height: 600px;
}

#newsCarousel .embla__container {
    display: flex;
    flex-direction: column;
    user-select: none;
    -webkit-touch-callout: none;
    -khtml-user-select: none;
    -ms-touch-action: pan-x;
    touch-action: pan-x pinch-zoom;
    -webkit-tap-highlight-color: transparent;
    backface-visibility: hidden;
    height: auto;
}

#newsCarousel .embla__slide {
    position: relative;
    flex: 0 0 auto;
    min-height: 19rem;
    width: 100%;
    padding: 10px 0;
}

... (all other #newsCarousel styles)
*/


/* Override Hero Styles for News Items */
#newsCarousel .carousel-item {
    position: relative;
    /* Not absolute */
    flex: 0 0 33.333%;
    /* 3 items per view */
    max-width: 33.333%;
    height: auto;
    opacity: 1;
    /* Always visible */
    transform: none;
    /* No zoom */
    display: block;
    /* Reset flex */
    padding: 15px;
    /* Gutter */
    transition: none;
    /* Handled by container */
}

#newsCarousel .carousel-item.active {
    transform: none;
    /* No scale */
    z-index: 1;
}

#newsCarousel .carousel-item .card {
    opacity: 1;
    transform: none;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#newsCarousel .card-image-wrapper {
    height: 180px;
    /* Fixed, smaller height */
    width: 100%;
    padding-bottom: 0;
    /* Remove aspect ratio hack */
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

#newsCarousel .card-content {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#newsCarousel .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

#newsCarousel .card-description {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

#newsCarousel .cta-button {
    margin-top: auto;
    /* Push to bottom */
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
}

#newsCarousel .card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#newsCarousel .carousel-btn {
    background: rgba(91, 44, 145, 0.1);
    color: #5B2C91;
    backdrop-filter: blur(5px);
    width: 40px;
    height: 40px;
}

#newsCarousel .carousel-btn:hover {
    background: #5B2C91;
    color: white;
}

#newsCarousel .carousel-btn.prev {
    left: 0;
}

#newsCarousel .carousel-btn.next {
    right: 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    #newsCarousel .carousel-item {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 600px) {
    #newsCarousel .carousel-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
}


.carousel-inner {
    position: relative;
    width: 100%;
    height: 500px;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1.05);
    /* Start slightly zoomed in */
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-item.active {
    opacity: 1;
    transform: scale(1);
    /* Zoom to normal */
    pointer-events: auto;
    z-index: 1;
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 6s ease-out;
    /* Subtle ken burns effect */
}

.carousel-item.active img {
    transform: scale(1.05);
}

/* Specific styles for News Cards inside Carousel */
.carousel-item .card {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease 0.2s;
    /* Delayed entrance */
    max-width: 600px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.carousel-item.active .card {
    opacity: 1;
    transform: translateY(0);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.carousel-indicators {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    border-radius: 30px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid transparent;
}

.indicator.active {
    background: #fff;
    width: 30px;
    /* Stretch active indicator */
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.indicator:hover:not(.active) {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

/* ==========================================
   CARDS GRID
   ========================================== */

.cards-grid,
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.15);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.25);
}

/* Card images - JS Generated Cards */
.card-image-wrapper {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #f5ebff 0%, #e8d5ff 100%);
    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Card content - JS Generated Cards */
.card-content {
    padding: 1.25rem 1.5rem 1.75rem;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #5B2C91;
    margin: 0 0 0.75rem;
}

.card-description {
    font-size: 0.95rem;
    color: #4a148c;
    line-height: 1.6;
    margin: 0;
}

/* Legacy card styles for backwards compatibility */
.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-text {
    font-size: 0.95rem;
    color: #4a148c;
    padding: 0 1rem 1.5rem;
    line-height: 1.5;
}

/* ==========================================
   LOGOS GRID
   ========================================== */

.logos-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.logos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-item img {
    max-width: 150px;
    max-height: 150px;
    object-fit: contain;
}

.logo-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.15);
}

.logo-placeholder:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.3);
}

/* ==========================================
   LEARNING CONTENT
   ========================================== */

.learning-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    align-items: center;
}

.learning-text h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #5B2C91;
    margin-bottom: 1rem;
}

.learning-text p {
    font-size: 1rem;
    color: #4a148c;
    margin-bottom: 1rem;
    line-height: 1.7;
}

.cta-button {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #5B2C91, #8B3A9C);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.2);
    margin-top: 1rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.3);
    background: linear-gradient(135deg, #6a35a8, #9c45b0);
}

/* Placeholder Images */
.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: rgba(138, 43, 226, 0.08);
    backdrop-filter: blur(10px);
    color: #4a148c;
    text-align: center;
    padding: 1.5rem;
    width: 100%;
    font-size: 0.9rem;
    border-top: 1px solid rgba(138, 43, 226, 0.15);
    position: relative;
}

.footer p {
    margin: 0;
    font-weight: 500;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .header-title {
        font-size: 1.4rem;
    }

    .tree-container {
        max-width: 600px;
    }

    .logo {
        max-width: 500px;
    }

    .bubble {
        width: 90px;
        height: 90px;
    }

    .bubble span {
        font-size: 0.55rem;
    }

    #bubble-centro {
        top: 18%;
        left: 18%;
    }

    #bubble-disciplinas {
        top: 18%;
        right: 18%;
    }

    #bubble-convenios {
        bottom: 35%;
        left: 12%;
    }

    #bubble-aprendiendo {
        bottom: 35%;
        right: 12%;
    }

    .section-title {
        font-size: 2rem;
    }

    .carousel-inner {
        height: 300px;
    }

    .carousel-btn {
        font-size: 2rem;
        padding: 0.3rem 0.7rem;
    }

    .cards-grid,
    .news-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .logos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .learning-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    .cards-grid,
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .logos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   CONTACT FORM
   ========================================== */

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(138, 43, 226, 0.15);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #5B2C91;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid rgba(138, 43, 226, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #5B2C91;
    background: white;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #5B2C91, #8B3A9C);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
    background: linear-gradient(135deg, #6a35a8, #9c45b0);
}


/* Placeholder Images */
.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==========================================
   FOOTER
   ========================================== */

.footer {
    background: rgba(138, 43, 226, 0.08);
    backdrop-filter: blur(10px);
    color: #4a148c;
    text-align: center;
    padding: 1.5rem;
    width: 100%;
    font-size: 0.9rem;
    border-top: 1px solid rgba(138, 43, 226, 0.15);
    position: relative;
}

.footer p {
    margin: 0;
    font-weight: 500;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */

@media (max-width: 768px) {
    .header-title {
        font-size: 1.4rem;
    }

    .tree-container {
        max-width: 600px;
    }

    .logo {
        max-width: 500px;
    }

    .bubble {
        width: 90px;
        height: 90px;
    }

    .bubble span {
        font-size: 0.55rem;
    }

    #bubble-centro {
        top: 5%;
        left: 18%;
    }

    #bubble-disciplinas {
        top: 5%;
        right: 18%;
    }

    #bubble-convenios {
        bottom: 25%;
        left: 12%;
    }

    #bubble-contacto {
        bottom: 25%;
        right: 12%;
    }

    .section-title {
        font-size: 2rem;
    }

    .carousel-inner {
        height: 300px;
    }

    .carousel-btn {
        font-size: 2rem;
        padding: 0.3rem 0.7rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .logos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .learning-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .logos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   CONTACT FORM
   ========================================== */

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(138, 43, 226, 0.15);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: #5B2C91;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.9rem 1.2rem;
    border: 2px solid rgba(138, 43, 226, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #5B2C91;
    background: white;
    box-shadow: 0 0 0 3px rgba(138, 43, 226, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #5B2C91, #8B3A9C);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.3);
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.4);
    background: linear-gradient(135deg, #6a35a8, #9c45b0);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ==========================================
   MODAL STYLES
   ========================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 40px rgba(138, 43, 226, 0.25);
    position: relative;
    animation: slideIn 0.3s ease;
    text-align: center;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-title {
    color: #5B2C91;
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
}

.modal-body {
    margin-bottom: 2rem;
    color: #4a148c;
    font-size: 1.1rem;
    line-height: 1.6;
}

.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #5B2C91;
}

.modal-btn {
    padding: 0.8rem 2rem;
    background: linear-gradient(135deg, #5B2C91, #8B3A9C);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(138, 43, 226, 0.2);
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(138, 43, 226, 0.3);
}

.modal-btn.error {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}