/* ----------------------------------
   PALETA DE COLORES Y VARIABLES
----------------------------------- */

:root {
    /* Colores Principales - Mapped to Global Palette */
    --green-deep: #182226;
    /* Navbar Color */
    --green-dark: #25521D;
    /* Accent Green */
    --green-primary: #25521D;
    /* Primary Button Green */
    --green-accent: #0A4828;
    /* Hover Green */
    --green-light: #E8ECEF;
    /* Light Grey/Blue for backgrounds */

    /* Grises - Mapped to Global Palette */
    --gray-darker: #1B3A2A;
    /* Match Navbar Scrolled / Deep Green */
    --gray-dark: #0B1E1A;
    --gray-medium: #1A1A1A;
    /* Black for maximum visibility */
    --gray-light: #F5F7F9;
    /* Card BG */
    --gray-border: #d0d6db;

    /* Base */
    --white: #ffffff;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 15px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);

    /* Espaciado */
    --border-radius-card: 12px;
    --border-radius-btn: 50px;
}

/* ----------------------------------
   GLOBAL RESET & TYPOGRAPHY
----------------------------------- */

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

body {
    background-color: transparent;
    /* Let global body gradient show */
    font-family: 'Open Sans', sans-serif;
    color: var(--gray-dark);
    line-height: 1.6;
    font-size: 16px;
    padding-top: 0;
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--gray-darker);
    line-height: 1.3;
}

p {
    margin-bottom: 1.5rem;
    color: var(--gray-medium);
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

/* ----------------------------------
   LAYOUT UTILITIES
----------------------------------- */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
    background: transparent !important;
}

/* ----------------------------------
   NAVBAR OVERRIDE
----------------------------------- */
/* Navbar mantiene su estilo original de styles.css */

/* ----------------------------------
   HERO SECTION
----------------------------------- */

.service-hero {
    /* Base background if classes are not applied */
    background: url('images/fondo.png') no-repeat center center/cover !important;
    position: relative;
    padding: 120px 0 80px;
    /* More compact */
    color: var(--white);
    /* Reverted to white */
    text-align: center;
    overflow: hidden;
    margin-bottom: 0;
    margin-top: 0;
    z-index: 1;
}

/* Dark overlay for service hero to ensure white text legibility and contrast with body */
.service-hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    /* Dark semi-transparent overlay */
    z-index: -1;
}

/* Subtle pattern overlay */
.service-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 10%),
        radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.05) 0%, transparent 10%);
    pointer-events: none;
}

.service-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.service-icon-large i,
.service-icon-large .icon-mask {
    font-size: 2.5rem;
    /* Smaller icons */
    color: var(--white);
    /* Reverted to white icon */
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.1);
    /* Subtle light background */
    padding: 15px;
    border-radius: 50%;
    backdrop-filter: blur(3px);
}

.service-hero h1 {
    font-size: 2.2rem;
    /* Slighly smaller title */
    margin-bottom: 0.8rem;
    color: var(--white);
    /* Reverted to white title */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    /* Stronger contrast for white text */
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.service-tagline {
    font-size: 1.1rem;
    /* More subtle tagline */
    color: rgba(255, 255, 255, 0.9);
    /* Reverted to light gray/white */
    font-weight: 500;
    /* Balanced for legibility */
    max-width: 700px;
    margin: 0 auto;
}

/* Service-Specific Hero Backgrounds */
.hero-plantas {
    background-image: url('images/heros/plantas.png') !important;
    filter: brightness(0.8);
}

.hero-hongos {
    background-image: url('images/heros/hongos.png') !important;
    filter: brightness(0.8);
}

.hero-bioinformatica {
    background-image: url('images/heros/bioinformatica.png') !important;
    filter: brightness(0.8);
}

.hero-redaccion {
    background-image: url('images/heros/redaccion.png') !important;
    filter: brightness(0.8);
}

.hero-becas {
    background-image: url('images/heros/becas.png') !important;
    filter: brightness(0.8);
}

.hero-web {
    background-image: url('images/heros/web.png') !important;
    filter: brightness(0.8);
}

/* ----------------------------------
   CONTENT GRID
----------------------------------- */

.service-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

/* ----------------------------------
   MAIN CONTENT AREA
----------------------------------- */

.service-main-content {
    background: var(--white);
    padding: 40px;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-border);
}

.service-main-content h2 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    border-bottom: 3px solid var(--gray-border);
    padding-bottom: 0.8rem;
    display: block;
}

.service-main-content h3 {
    font-size: 1.4rem;
    margin-top: 2.5rem;
    margin-bottom: 1.2rem;
    color: var(--green-dark);
}

/* Feature List Styling */
.service-features-list {
    margin-top: 20px;
}

.feature-item {
    margin-bottom: 30px;
    padding: 25px;
    background: var(--gray-light);
    border-radius: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid var(--green-primary);

    /* Improved 2-Column Layout */
    display: grid;
    grid-template-columns: 240px 1fr;
    /* Balanced width for titles */
    gap: 40px;
    align-items: start;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 992px) {
    .feature-item {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }
}

.feature-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--white);
}

.feature-header {
    display: flex;
    align-items: flex-start;
    /* Align icon with top of text */
    gap: 20px;
    margin-bottom: 0;
    /* Removing bottom margin */
    align-self: center;
}

.feature-header i {
    color: var(--green-primary);
    font-size: 1.3rem;
    margin-top: 2px;
    /* Slight adjustment for alignment */
    flex-shrink: 0;
}

.feature-header span {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--gray-darker);
    line-height: 1.3;
}

/* New Right Column Wrapper */
.feature-content {
    margin-bottom: 0;
    padding-left: 0;
    /* Grid handles spacing */
    font-size: 0.95rem;
    color: var(--gray-medium);
}

.feature-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.feature-content ul {
    padding-left: 0;
    list-style: none;
    /* Reset default */
    margin: 0;
}

.feature-content ul li {
    position: relative;
    padding: 3px 0 3px 20px;
    /* Space for bullet */
    margin-bottom: 5px;
}

.feature-content ul li::before {
    content: "•";
    color: var(--green-primary);
    font-weight: bold;
    position: absolute;
    left: 0;
    /* Bullet at absolute left */
    top: 3px;
    /* Align with text top */
    width: 20px;
    /* Ensure generic width */
    text-align: left;
}

/* ----------------------------------
   SIDEBAR
----------------------------------- */

.service-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 100px;
    /* If header is fixed */
}

/* CTA Box */
.service-cta-box {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius-card);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    /* Softer shadow */
    text-align: center;
    border-top: 5px solid var(--green-primary);
}

.service-cta-box h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--gray-darker);
}

.service-cta-box p {
    font-size: 0.95rem;
    margin-bottom: 20px;
    color: var(--gray-medium);
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    border-radius: var(--border-radius-btn);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    width: 100%;
    margin-bottom: 15px;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--green-primary);
    color: var(--white);
    border: none;
    box-shadow: 0 4px 6px rgba(20, 166, 106, 0.2);
}

.btn-primary:hover {
    background-color: var(--green-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 8px rgba(20, 166, 106, 0.3);
}

.btn-outline-dark {
    background-color: transparent;
    border: 2px solid var(--gray-darker);
    color: var(--gray-darker);
}

.btn-outline-dark:hover {
    background-color: var(--gray-darker);
    color: var(--white);
}

.btn i {
    margin-right: 8px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Related Services */
.related-services {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius-card);
    box-shadow: var(--shadow-sm);
}

.related-services h4 {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-medium);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--gray-border);
    padding-bottom: 10px;
}

.related-services ul li {
    margin-bottom: 12px;
}

.related-services ul li:last-child {
    margin-bottom: 0;
}

.related-services ul li a {
    color: var(--green-dark);
    font-weight: 600;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--gray-light);
}

.related-services ul li a:hover {
    background: var(--green-light);
    color: var(--green-deep);
    padding-left: 16px;
    /* Slid effect */
}


/* ----------------------------------
   RESPONSIVIDAD
----------------------------------- */

@media (max-width: 900px) {
    .service-content-grid {
        grid-template-columns: 1fr;
    }

    .service-hero {
        padding: 100px 20px 60px;
    }

    .service-hero h1 {
        font-size: 2rem;
    }

    .service-icon-large i,
    .service-icon-large .icon-mask {
        font-size: 2rem;
        padding: 12px;
        margin-bottom: 1.5rem;
    }

    .service-main-content {
        padding: 25px;
    }

    /* Stack the feature item columns on mobile */
    .feature-item {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature-header {
        /* Revert to row if preferred, or keep column. 
           But since we are stacking header/text, header might better be row. 
           Let's keep it row for icon + title. */
        flex-direction: row;
        align-items: flex-start;
        margin-bottom: 15px;
        /* Add space between header and text */
    }

    .feature-text,
    .feature-content {
        padding-left: 0;
        margin-top: 0;
    }

    .service-sidebar {
        position: static;
        order: 2;
        /* Main content first, sidebar second if needed, or default order */
    }
}

@media (max-width: 500px) {
    .service-hero h1 {
        font-size: 1.8rem;
    }

    .service-tagline {
        font-size: 1.1rem;
    }

    .service-main-content {
        padding: 20px;
    }

    .service-cta-box {
        padding: 20px;
    }

    /* Ensure images don't overflow */
    .service-main-content img {
        max-width: 100%;
        height: auto;
    }
}

/* === Forzar alineación uniforme de las 2 columnas internas (left = titles, right = content) === */
/* Pegar esto AL FINAL de international.css para que sobrescriba reglas anteriores */

.service-main-content .service-features-list .feature-item {
    display: grid !important;
    grid-template-columns: 240px 1fr !important;
    /* ancho fijo para la columna de títulos */
    gap: 15px !important;
    /* adjusted from 24px */
    align-items: start !important;
    grid-auto-rows: minmax(20px, auto) !important;
    /* asegúrate de que las cards usan el mismo tamaño de caja */
    box-sizing: border-box !important;
    padding-left: 6px !important;
    /* adjusted from 25px */
}

/* Fuerza explícita para que header y content ocupen sus columnas */
.service-main-content .feature-item>.feature-header {
    grid-column: 1 / 2 !important;
    align-self: center !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Contenido (texto y listas) siempre en columna derecha */
.service-main-content .feature-item>.feature-content {
    grid-column: 2 / -1 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Evitar que elementos internos (p, ul, li) añadan offsets inesperados */
.service-main-content .feature-content p,
.service-main-content .feature-content ul {
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
}

/* Alinea bullets y evita que la lista cambie el ancho */
.service-main-content .feature-content ul {
    list-style: none !important;
    padding-left: 0 !important;
}

.service-main-content .feature-content ul li {
    position: relative;
    padding-left: 22px !important;
    margin-bottom: 8px !important;
}

/* Pseudo-bullet consistente (verde) */
.service-main-content .feature-content ul li::before {
    content: "•" !important;
    position: absolute !important;
    left: 0 !important;
    top: 0.05rem !important;
    color: var(--green-primary, #0b6e4f) !important;
    font-size: 1rem !important;
    line-height: 1 !important;
}

/* Mobile: stack columns */
@media (max-width: 992px) {
    .service-main-content .feature-item {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .service-main-content .feature-item>.feature-header,
    .service-main-content .feature-item>.feature-content {
        grid-column: 1 / -1 !important;
        /* Force span full width */
        width: 100% !important;
    }

    /* Adjust header alignment for mobile */
    .service-main-content .feature-item>.feature-header {
        margin-bottom: 10px !important;
    }
}

/* ----------------------------------
   RESPONSIVE NAVIGATION
----------------------------------- */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(16, 54, 61, 0.98);
        padding: 20px 0;
        text-align: center;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .nav-links li a {
        font-size: 1.1rem;
        display: block;
        padding: 10px;
    }

    /* Ensure Sidebar Stacks Correctly */
    .service-content-grid {
        grid-template-columns: 1fr;
    }

    margin-top: 40px;
}
}

/* --- MUSHROOM PAGE SPECIFIC CAROUSEL ADJUSTMENTS (HORIZONTAL FORMAT) --- */
.mushroom-carousel .intl-carousel-item {
    width: 600px;
    height: 400px;
}

.mushroom-carousel .intl-carousel-item img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    border-radius: 16px;
}

/* Adjust offsets for wider items to maintain spacing */
.mushroom-carousel .intl-carousel-item.position-1 {
    transform: translate(calc(-50% + 350px), -50%) scale(0.9);
}

.mushroom-carousel .intl-carousel-item.position-2 {
    transform: translate(calc(-50% + 550px), -50%) scale(0.7);
}

.mushroom-carousel .intl-carousel-item.position-3 {
    transform: translate(calc(-50% + 700px), -50%) scale(0.5);
}

.mushroom-carousel .intl-carousel-item.position-7 {
    transform: translate(calc(-50% - 350px), -50%) scale(0.9);
}

.mushroom-carousel .intl-carousel-item.position-6 {
    transform: translate(calc(-50% - 550px), -50%) scale(0.7);
}

.mushroom-carousel .intl-carousel-item.position-5 {
    transform: translate(calc(-50% - 700px), -50%) scale(0.5);
}

/* Responsive adjustments for the horizontal carousel */
@media (max-width: 900px) {
    .mushroom-carousel .intl-carousel-item {
        width: 450px;
        height: 300px;
    }

    .mushroom-carousel .intl-carousel-item img {
        object-fit: contain;
        border-radius: 16px;
    }

    .mushroom-carousel .intl-carousel-item.position-1 {
        transform: translate(calc(-50% + 200px), -50%) scale(0.9);
    }

    .mushroom-carousel .intl-carousel-item.position-7 {
        transform: translate(calc(-50% - 200px), -50%) scale(0.9);
    }
}

@media (max-width: 600px) {
    .mushroom-carousel .intl-carousel-item {
        width: 280px;
        height: 187px;
    }

    .mushroom-carousel .intl-carousel-item img {
        object-fit: contain;
        border-radius: 12px;
    }

    .mushroom-carousel .intl-carousel-item.position-1 {
        transform: translate(calc(-50% + 160px), -50%) scale(0.75);
        opacity: 0.8;
    }

    .mushroom-carousel .intl-carousel-item.position-7 {
        transform: translate(calc(-50% - 160px), -50%) scale(0.75);
        opacity: 0.8;
    }

    .mushroom-carousel .intl-carousel-item.position-2 {
        transform: translate(calc(-50% + 280px), -50%) scale(0.5);
        opacity: 0.5;
    }

    .mushroom-carousel .intl-carousel-item.position-6 {
        transform: translate(calc(-50% - 280px), -50%) scale(0.5);
        opacity: 0.5;
    }
}

/* ---------- International 3D Carousel Styles ---------- */
.intl-carousel-3d {
    position: relative;
    width: 100%;
    height: 450px;
    /* Adjust height as needed */
    margin: 60px 0;
    perspective: 1000px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.intl-carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.intl-carousel-item {
    position: absolute;
    width: 300px;
    height: 400px;
    /* Fixed height for uniformity */
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-radius: 16px;
    box-shadow: none;
    cursor: pointer;
    background: transparent;
    overflow: hidden;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    /* Default hidden */
    opacity: 0;
    z-index: 0;

    /* Flex to center landscape images */
    display: flex;
    align-items: center;
    justify-content: center;
}

.intl-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: transparent;
    display: block;
    border-radius: 16px;
}



/* Positions */

/* Center (Active) */
.intl-carousel-item.position-0 {
    transform: translate(-50%, -50%) scale(1.1);
    z-index: 10;
    opacity: 1;
    box-shadow: none;
}

/* Right 1 */
.intl-carousel-item.position-1 {
    transform: translate(calc(-50% + 240px), -50%) scale(0.9);
    z-index: 8;
    opacity: 1;
}

/* Right 2 */
.intl-carousel-item.position-2 {
    transform: translate(calc(-50% + 400px), -50%) scale(0.7);
    z-index: 6;
    opacity: 0.6;
}

/* Right 3 (Fading out) */
.intl-carousel-item.position-3 {
    transform: translate(calc(-50% + 520px), -50%) scale(0.5);
    z-index: 4;
    opacity: 0.2;
}

/* Left 1 */
.intl-carousel-item.position-7 {
    transform: translate(calc(-50% - 240px), -50%) scale(0.9);
    z-index: 8;
    opacity: 1;
}

/* Left 2 */
.intl-carousel-item.position-6 {
    transform: translate(calc(-50% - 400px), -50%) scale(0.7);
    z-index: 6;
    opacity: 0.6;
}

/* Left 3 (Fading out) */
.intl-carousel-item.position-5 {
    transform: translate(calc(-50% - 520px), -50%) scale(0.5);
    z-index: 4;
    opacity: 0.2;
}

/* Explicitly Hidden */
.intl-carousel-item.position-hidden {
    transform: translate(-50%, -50%) scale(0);
    z-index: 0;
    opacity: 0;
    pointer-events: none;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .intl-carousel-3d {
        height: 400px;
    }

    .intl-carousel-item {
        width: 260px;
        height: 350px;
    }

    .intl-carousel-item.position-1 {
        transform: translate(calc(-50% + 180px), -50%) scale(0.85);
    }

    .intl-carousel-item.position-2 {
        transform: translate(calc(-50% + 320px), -50%) scale(0.65);
    }

    .intl-carousel-item.position-7 {
        transform: translate(calc(-50% - 180px), -50%) scale(0.85);
    }

    .intl-carousel-item.position-6 {
        transform: translate(calc(-50% - 320px), -50%) scale(0.65);
    }
}

@media (max-width: 600px) {
    .intl-carousel-3d {
        height: 380px;
    }

    .intl-carousel-item {
        width: 220px;
        height: 300px;
    }

    /* Active Center */
    .intl-carousel-item.position-0 {
        transform: translate(-50%, -50%) scale(1);
        z-index: 10;
        opacity: 1;
    }

    /* Right 1 - Tucked behind */
    .intl-carousel-item.position-1 {
        transform: translate(calc(-50% + 70px), -50%) scale(0.8);
        z-index: 8;
        opacity: 0.8;
    }

    /* Right 2 - Hidden on mobile */
    .intl-carousel-item.position-2 {
        transform: translate(calc(-50% + 140px), -50%) scale(0.6);
        z-index: 6;
        opacity: 0;
        pointer-events: none;
    }

    /* Left 1 - Tucked behind */
    .intl-carousel-item.position-7 {
        transform: translate(calc(-50% - 70px), -50%) scale(0.8);
        z-index: 8;
        opacity: 0.8;
    }

    /* Left 2 - Hidden on mobile */
    .intl-carousel-item.position-6 {
        transform: translate(calc(-50% - 140px), -50%) scale(0.6);
        z-index: 6;
        opacity: 0;
        pointer-events: none;
    }
}



/* --- VERTICAL VIDEO PRESENTATION --- */
.video-presentation {
    margin: 60px auto;
    max-width: 320px;
    /* Elegant vertical width */
    width: 100%;
    position: relative;
    border-radius: 24px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    /* Subtle frame */
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.vertical-service-video {
    width: 100%;
    height: auto;
    aspect-ratio: 9/16;
    object-fit: cover;
    border-radius: 16px;
    display: block;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .video-presentation {
        max-width: 260px;
        margin: 40px auto;
        padding: 5px;
    }

    .vertical-service-video {
        border-radius: 12px;
    }
}