/* 
  Diving Austral - Design System & Styles
*/

/* --- 1. CSS VARIABLES (DESIGN TOKENS) --- */
:root {
    /* Color Palette required by user */
    --color-bg-main: #00253a;        /* Azul oscuro (fondo principal) */
    --color-bg-grad: #014260;        /* Azul intermedio (gradiente en hero) */
    --color-highlight: #FFD600;      /* Amarillo (texto destacado y botón) */
    --color-white: #FFFFFF;          /* Blanco (tipografía principal) */
    --color-grey: rgba(46, 46, 46, 0.7); /* Gris oscuro (texto secundario / overlay) */
    --color-grey-solid: #2E2E2E;
    --color-black: #000000;          /* Negro (texto menú) */
    --color-bg-darker: #001a29;      /* Azul aún más oscuro para contraste entre secciones */
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Layout */
    --container-width: 1200px;
    --section-padding: 6rem 0;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- 2. RESET & BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: linear-gradient(rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.85)), url('bg-hero-2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

p {
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.85); /* Slightly muted white for better reading */
    font-weight: 300;
}

/* --- 3. UTILITIES & LAYOUT --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-padding);
}

.bg-darker {
    background-color: var(--color-bg-darker);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.subtitle {
    display: inline-block;
    color: var(--color-highlight);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.highlight {
    color: var(--color-highlight);
}

.grids-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* Animation Reveal Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Buttons */
.btn-primary, .btn-primary-small, .btn-outline {
    display: inline-block;
    font-family: var(--font-heading);
    font-weight: 700;
    border-radius: 4px; /* Slight rounding for professional look */
    cursor: pointer;
    text-align: center;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-highlight);
    color: var(--color-black);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 214, 0, 0.3);
}

.btn-primary:hover {
    background-color: #fff; /* Shifts to white on hover */
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

.btn-primary-small {
    background-color: var(--color-highlight);
    color: var(--color-black);
    padding: 0.6rem 1.5rem;
    font-size: 0.95rem;
}

.btn-primary-small:hover {
    background-color: #fff;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-outline:hover {
    background-color: var(--color-white);
    color: var(--color-black);
}

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

/* --- 4. NAVBAR --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    transition: var(--transition-medium);
    /* Transparent requested initially, solid black text on white bg when scrolled */
    background-color: transparent; 
}

.navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.5rem;
    color: var(--color-white);
}

.logo i {
    color: var(--color-highlight);
    font-size: 2rem;
}

.logo img {
    /* El nuevo logo proporcionado probablemente sea blanco, por ende inicialmente no hay filtro */
    filter: none;
    transition: filter var(--transition-medium);
}

.navbar.scrolled .logo img {
    /* Al hacer scroll sobre fondo blanco, oscurecemos el logo (lo hacemos negro) */
    filter: brightness(0); 
}

.logo-text {
    transition: var(--transition-medium);
}

.navbar.scrolled .logo-text {
    color: var(--color-black) !important;
}


.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--color-white);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar.scrolled .nav-links a:not(.btn-primary-small) {
    color: var(--color-black); /* Requested text menu */
}

.navbar.scrolled .nav-links a:not(.btn-primary-small):hover {
    color: var(--color-bg-main);
}

.nav-links a:hover {
    color: var(--color-highlight);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.8rem;
    cursor: pointer;
}

.navbar.scrolled .mobile-toggle {
    color: var(--color-black);
}

/* --- 5. HERO SECTION --- */
.hero {
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Unified dynamic background mapping */
    background: linear-gradient(rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.85)), url('bg-hero-2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}



.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 800px;
    padding: 0 1.5rem;
}

.hero h1 {
    font-size: 3.8rem; /* Slightly smaller to fit the longer text */
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-inline: auto;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    z-index: 10;
}

.scroll-indicator i {
    font-size: 2rem;
    color: var(--color-white);
    opacity: 0.7;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}


/* --- 6. ABOUT SECTION --- */
.about {
    /* Unified background with Hero */
    background: linear-gradient(rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.85)), url('bg-hero-2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.about-text p {
    text-align: justify;
}

.stats-container {
    display: flex;
    gap: 3rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.stat-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--color-highlight);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.7;
}

.about-image {
    position: relative;
    height: 100%;
    min-height: 400px;
}

.image-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(45deg, var(--color-bg-grad), var(--color-bg-darker));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.glass-card {
    position: absolute;
    bottom: -30px;
    left: -30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
}

.feature-item i {
    color: var(--color-highlight);
    font-size: 1.2rem;
}

/* --- 7. SERVICES SECTION --- */
.services.section {
    /* Unified background with Hero */
    background: linear-gradient(rgba(5, 5, 5, 0.85), rgba(5, 5, 5, 0.85)), url('bg-hero-2.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background-color: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    transition: var(--transition-medium);
    position: relative;
    overflow: hidden;
}

.service-card > *:not(.bg-video):not(.bg-img):not(.service-overlay) {
    position: relative;
    z-index: 2;
}

.service-card .bg-video, .service-card .bg-img {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) scale(1.35); /* scale up to hide subtitles */
    object-fit: cover;
    z-index: 0;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    pointer-events: none;
}

.service-card.has-video .bg-video, .service-card.has-bg-image .bg-img {
    opacity: 0.6; /* Much more visible natively */
}

.service-card.has-video:hover .bg-video, .service-card.has-bg-image:hover .bg-img {
    opacity: 1; /* Fully visible on hover */
    transform: translate(-50%, -50%) scale(1.4);
}

.service-card .service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient: darker at the bottom for text base readability, clear at the top */
    background: linear-gradient(to top, rgba(0, 5, 10, 0.8) 0%, rgba(0, 37, 58, 0.2) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card.has-video .service-overlay, .service-card.has-bg-image .service-overlay {
    opacity: 1;
}

.service-card.has-video:hover .service-overlay, .service-card.has-bg-image:hover .service-overlay {
    opacity: 0.4; /* Fade out overlay substantially so video pops out */
}

/* Added text shadows for readability when video gets bright */
.service-card h3, .service-card p {
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.service-card:hover {
    background-color: rgba(255,255,255,0.08);
    transform: translateY(-10px);
    border-color: rgba(255,214,0,0.3); /* highlight border on hover */
}

.service-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 214, 0, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--color-highlight);
    font-size: 2rem;
    transition: var(--transition-fast);
}

.service-card:hover .service-icon {
    background-color: var(--color-highlight);
    color: var(--color-bg-main);
}

/* --- 8. CTA / OSR SECTION --- */
.cta-section {
    position: relative;
    text-align: center;
    padding: 8rem 0;
    overflow: hidden;
}

.cta-background {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Dark overlay over an implied image */
    background: linear-gradient(rgba(0, 37, 58, 0.9), rgba(0, 37, 58, 0.9)), 
                radial-gradient(circle at center, var(--color-bg-grad) 0%, var(--color-bg-main) 100%);
    z-index: -1;
}

.cta-section p {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* --- 9. CONTACT SECTION --- */
.contact-methods {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--color-highlight);
    margin-top: 0.2rem;
}

.contact-item h4 {
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.contact-item p {
    margin: 0;
    font-size: 0.9rem;
}

.contact-form {
    background: rgba(255, 255, 255, 0.03);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--color-white);
    font-family: var(--font-body);
    transition: var(--transition-fast);
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-highlight);
    background-color: rgba(0, 0, 0, 0.4);
}

/* Style the select options for visibility */
.form-group select option {
    background-color: var(--color-bg-main);
    color: var(--color-white);
}

.form-success {
    display: none;
    margin-top: 1rem;
    padding: 1rem;
    background-color: rgba(46, 204, 113, 0.1);
    border-left: 4px solid #2ecc71;
    color: #2ecc71;
    font-weight: 600;
}

/* --- 10. HITOS (MILESTONES) SECTION --- */
.hitos-interactive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.hito-interactive-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-medium);
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hito-interactive-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 214, 0, 0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
}

/* Horizontal variation for featured milestones */
.hito-interactive-card.horizontal {
    flex-direction: row;
    grid-column: 1 / -1; /* Ocupa todo el ancho del grid */
}

.hito-interactive-card.horizontal .hito-video-container {
    flex: 1.2;
    border-radius: 12px 0 0 12px;
}

.hito-interactive-card.horizontal .hito-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-color: #000000; /* Fondo negro como fue solicitado */
}

.hito-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: var(--transition-medium);
}

.hito-interactive-card:hover .hito-image {
    transform: scale(1.05);
}

.placeholder-img {
    background: linear-gradient(45deg, var(--color-bg-darker), var(--color-bg-main));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-img i {
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.1);
}

.hito-content {
    background: var(--color-bg-darker);
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2; /* Para que quede por encima de la imagen al hacer scale */
}

.hito-content h3 {
    color: var(--color-highlight);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.hito-content p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

/* Proyectos Table */
.proyectos-table-container {
    width: 100%;
    margin: 3rem auto 0;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow-x: auto;
    max-height: 480px;
    overflow-y: auto;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

.proyectos-table-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
.proyectos-table-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}
.proyectos-table-container::-webkit-scrollbar-thumb {
    background: rgba(255, 214, 0, 0.4);
    border-radius: 4px;
}
.proyectos-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 214, 0, 0.7);
}

.proyectos-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.proyectos-table th, .proyectos-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.proyectos-table th {
    background: rgba(0, 0, 0, 0.8);
    color: var(--color-highlight);
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(5px);
}

.proyectos-table tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.proyectos-table td {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
}

.pt-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    white-space: nowrap;
}

.pt-client {
    font-weight: 600;
    color: var(--color-white);
}

/* Hitos Animations */
#hitos-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transform-origin: center;
}

.active-pan {
    animation: slowPan 25s infinite alternate linear;
}

@keyframes slowPan {
    0% { transform: scale(1); }
    100% { transform: scale(1.2); }
}

/* --- 10. FOOTER --- */
.footer {
    background-color: transparent;
    padding: 4rem 0 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    margin-top: 1rem;
    max-width: 300px;
    font-size: 0.9rem;
}

.footer-links h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--color-highlight);
}

.footer-bottom {
    background-color: rgba(0,0,0,0.5);
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.6;
}
/* --- 10. FOOTER --- */

.team-role {
    color: var(--color-highlight);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--color-highlight);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    display: inline-block;
    margin-top: 0.5rem;
}

/* --- 11. RESPONSIVE DESIGN (MEDIA QUERIES) --- */

@media (max-width: 900px) {
    .hitos-interactive-layout {
        grid-template-columns: 1fr !important;
    }
    .grids-2 {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .glass-card {
        bottom: 10px;
        left: 10px;
        right: 10px;
        position: relative;
        margin-top: -30px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hito-interactive-card.horizontal {
        flex-direction: column;
    }
    
    .hito-interactive-card.horizontal .hito-video-container {
        border-radius: 12px 12px 0 0 !important;
    }
    .hito-interactive-card.horizontal .hito-content {
        border-radius: 0 0 12px 12px !important;
        /* Swap order so video is always on top in mobile */
        order: 2; 
    }
    .hito-interactive-card.horizontal .hito-video-container {
        order: 1;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: var(--color-bg-main);
        flex-direction: column;
        justify-content: center;
        transition: 0.3s ease-in-out;
        border-left: 1px solid rgba(255,255,255,0.1);
        z-index: 999;
    }
    
    .nav-links.active {
        right: 0;
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }
    
    /* Ensure mobile links are white */
    .navbar.scrolled .nav-links a:not(.btn-primary-small) {
        color: var(--color-white); 
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* --- CLIENT LOGO MARQUEE --- */
@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-100%); }
}

.client-logo {
    height: 110px;
    margin: 0 4rem;
    opacity: 0.9;
    transition: all 0.4s ease;
    vertical-align: middle;
    border-radius: 4px;
}

.client-logo:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Interactive Map Buttons Hover */
.map-btn {
    flex-shrink: 0;
}
.map-btn:hover:not(.active) {
    background: rgba(255,255,255,0.1) !important;
    transform: translateX(10px);
}
.map-btn.active {
    box-shadow: 0 0 20px rgba(255, 214, 0, 0.2);
}

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

/* Custom transparent yellow scrollbar for Hitos */
.hitos-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 214, 0, 0.4) rgba(255, 255, 255, 0.05); /* Firefox Support */
}

.hitos-scrollbar::-webkit-scrollbar {
    width: 8px; /* Slightly thicker to be visible */
}
.hitos-scrollbar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.hitos-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255, 214, 0, 0.4);
    border-radius: 4px;
}
.hitos-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 214, 0, 0.7);
}


/* --- CERTIFICACIONES GRID SYSTEM --- */
.cert-grid-layout {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    width: 100%;
    margin-top: 2rem;
}

.cert-premium-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.01) 100%);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 340px;
    justify-content: flex-start;
    flex: 1 1 280px;
    max-width: 320px;
}

.cert-premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 214, 0, 0.06) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.cert-premium-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255, 214, 0, 0.45);
    box-shadow: 0 25px 45px rgba(255, 214, 0, 0.08), 0 0 30px rgba(255, 214, 0, 0.05);
}

.cert-premium-card:hover::before {
    opacity: 1;
}

.cert-logo-wrapper {
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 50%;
    padding: 1.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    margin-bottom: 2.25rem;
    transition: all 0.4s ease;
    z-index: 2;
}

.cert-premium-card:hover .cert-logo-wrapper {
    transform: scale(1.06) rotate(3deg);
    box-shadow: 0 12px 30px rgba(255, 214, 0, 0.25);
}

.cert-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.cert-card-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.85rem;
    font-family: var(--font-heading);
    z-index: 2;
    line-height: 1.3;
}

.cert-card-subtitle {
    font-size: 0.85rem;
    color: var(--color-highlight);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    line-height: 1.4;
    z-index: 2;
    max-width: 95%;
    margin: 0;
}

/* --- RESPONSIVE FIXES (ADDED FOR MOBILE) --- */
@media (max-width: 768px) {
    html { font-size: 14px; }
    
    /* Force 1 column on Buceo Comercial */
    #cat-buceo .services-grid {
        grid-template-columns: 1fr !important;
    }

    /* Horizontal scroll for Hitos buttons */
    .hitos-interactive-layout {
        display: flex !important;
        flex-direction: column !important;
    }
    .hitos-map-selectors {
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        max-height: none !important;
        padding: 5px 0 15px 0 !important;
        margin: 0 !important;
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x mandatory;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    .hitos-map-selectors h3 {
        display: none !important;
    }
    .map-btn {
        min-width: 85vw !important;
        scroll-snap-align: center;
        flex: 0 0 auto;
        padding: 1rem !important;
    }

    /* Mobile styles for Certificaciones Grid */
    .cert-grid-layout {
        gap: 1.5rem !important;
        padding: 0 10px !important;
    }
    .cert-premium-card {
        padding: 2rem 1.25rem !important;
        min-height: auto !important;
        flex: 1 1 100% !important;
        max-width: 100% !important;
        border-radius: 14px !important;
    }
    .cert-logo-wrapper {
        width: 110px !important;
        height: 110px !important;
        margin-bottom: 1.5rem !important;
        padding: 1rem !important;
    }
    .cert-card-title {
        font-size: 1.15rem !important;
        margin-bottom: 0.5rem !important;
    }
    .cert-card-subtitle {
        font-size: 0.8rem !important;
    }

    /* Team Organigram */
    .team-row {
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        justify-content: center !important;
    }
    .team-member {
        width: 32% !important;
        margin-bottom: 0 !important;
    }
    .team-member img {
        width: 60px !important;
        height: 60px !important;
        margin: 0 auto 0.5rem auto !important;
    }
    .team-member h4 {
        font-size: 0.75rem !important;
        line-height: 1.1 !important;
        margin-bottom: 0 !important;
    }
    .team-member p {
        font-size: 0.65rem !important;
        line-height: 1 !important;
        margin-top: 2px !important;
    }
}

@media (max-width: 768px) {
    .nav-social-icons {
        justify-content: flex-start !important;
        padding-top: 1rem;
        margin-left: 0 !important;
        border-left: none !important;
        border-top: 1px solid rgba(255,255,255,0.1);
        margin-top: 1rem;
    }
}
