
/* --- 0. Global & Root --- */
:root {
    --primary-color: #0e4150;
    --secondary-color: #00838f;
    --text-dark: #0e4150;
    --text-light: #555;
    --background-light: #f4f7fa;
    --white: #ffffff;
    --bg-web: #e9ecee;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--primary-color);
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- 1. Bootstrap Overrides & Custom Utilities --- */

/* Fondo con patrón de puntos para secciones específicas */
.bg-web {
    background-color: var(--bg-web);
    background-image: radial-gradient(#cacaca 1.25px, transparent 1.25px), radial-gradient(#cacaca 1.25px, var(--bg-web) 1.25px);
    background-size: 50px 50px;
    background-position: 0 0, 25px 25px;
}

/* Clases de utilidad */
.text-accent {
    color: var(--secondary-color) !important;
    font-style: italic;
    letter-spacing: -2px;
}

/* Quitar bordes redondeados globales */
.btn, .dropdown-menu, .card, .service-card, .form-control, .iti__dropdown-menu {
    border-radius: 0 !important;
}

/* Inputs de formulario (Focus) */
.form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(14, 65, 80, 0.25); /* Sombra con color primario */
}

/* Dropdowns */
.dropdown-item:focus, .dropdown-item:hover {
    background-color: var(--primary-color);
    color: var(--white);
}
.dropdown-item.active, .dropdown-item:active {
    background-color: var(--secondary-color);
    color: var(--white);
}

/* Botones (Focus y Estilos) */
.btn-primary {
    background-color: var(--primary-color);
    border: 1px solid transparent;
    padding: 12px 30px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.btn-primary:hover {
    background-color: var(--secondary-color);
    border: 1px solid transparent;
}
.btn-primary:focus {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.25rem rgba(14, 65, 80, 0.5);
    border: 1px solid transparent;
}

.btn-light {
    --bs-btn-color: var(--secondary-color);
    --bs-btn-bg: #f8f9fa;
    --bs-btn-border-color: #f8f9fa;
    --bs-btn-hover-color: #000;
    --bs-btn-hover-bg: #d3d4d5;
    --bs-btn-hover-border-color: #c6c7c8;
    --bs-btn-focus-shadow-rgb: 211, 212, 213;
    --bs-btn-active-color: #000;
    --bs-btn-active-bg: #c6c7c8;
    --bs-btn-active-border-color: #babbbc;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #000;
    --bs-btn-disabled-bg: #f8f9fa;
    --bs-btn-disabled-border-color: #f8f9fa;
}

.btn-light:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}

.btn-outline-dark {

    --bs-btn-color: var(--text-dark);
    --bs-btn-border-color: var(--text-dark);
    --bs-btn-hover-color: var(--white);
    --bs-btn-hover-bg: var(--text-dark);
    --bs-btn-hover-border-color: var(--text-dark);
    --bs-btn-active-color: var(--white);
    --bs-btn-active-bg: var(--text-dark);
    --bs-btn-active-border-color: var(--text-dark);
}
.btn-outline-dark:hover{
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.btn-outline-dark:focus {
    box-shadow: 0 0 0 0.25rem rgba(33, 37, 41, 0.5);
}
.btn-outline-light:focus {
        box-shadow: 0 0 0 0.25rem rgba(248, 249, 250, 0.5);
}

/* Utilidad para intl-tel-input */
.iti {
    width: 100%;
}

/* --- 2. Navbar --- */
.navbar {
    padding: 1.5rem 0;
    transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease;
}
.navbar-transparent {
    background-color: transparent;
}
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.85); /* Fondo blanco semi-transparente al hacer scroll */
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.navbar-brand img {
    height: 80px;
    width: auto;
    transition: height 0.4s ease, filter 0.4s ease;
}
.navbar-transparent .navbar-brand img {
    filter: brightness(0) invert(1); /* Logo blanco sobre video */
}
.navbar-scrolled .navbar-brand img {
    height: 80px;
    filter: none; /* Logo color normal sobre fondo blanco */
}
.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    margin-left: 1.5rem;
    transition: color 0.3s ease;
}
.navbar-scrolled .nav-link {
    color: var(--text-dark) !important;
}
.navbar-transparent .nav-link {
    color: var(--white) !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}
.nav-link:hover {
    color: var(--primary-color) !important;
}

/* --- 2.1. Navbar Toggler (Botón Hamburguesa) --- */
.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1); /* Borde blanco sobre video */
}
.navbar-toggler:focus {
    text-decoration: none;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(248, 249, 250, 0.25); /* Sombra de focus blanca */
}

/* FIX: Cambia el icono del toggler a oscuro cuando el navbar tiene fondo blanco */
.navbar-scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(14, 65, 80, 0.7)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* FIX: Cambia el borde y focus del toggler sobre fondo blanco */
.navbar-scrolled .navbar-toggler {
    border-color: rgba(14, 65, 80, 0.1);
}
.navbar-scrolled .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(14, 65, 80, 0.25); /* Sombra de focus color primario */
}


/* --- 3. Hero Section (#inicio-video) --- */
#inicio-video {
    position: relative;
    height: 100vh;
    min-height: 600px;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}
#inicio-video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0e4150;
    background: linear-gradient(150deg, rgba(94, 157, 175, 0.9) 0%, rgba(53, 110, 127, 0.8) 20%, rgba(14, 65, 80, 0.9) 40%, rgba(14, 65, 80, 0.8) 100%);
    z-index: 2;
}
.hero-container {
    position: relative;
    z-index: 3;
    text-align: left;
    color: var(--white);
    float: left;
    width: 100%;
    padding: 20px;
}
.hero-container h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 4px 4px 2px rgba(14, 65, 80, 0.53);
    font-style: italic;
}
.hero-container p { /* Subtítulo estático */
    font-size: 1.5rem;
    margin-bottom: 2rem;
    font-weight: 100 !important;
    color: #70d7e0;
    font-style: italic;
    letter-spacing: -2px;
}
.hero-container .typed-text-container {
    font-size: 1.5rem;
    font-weight: 500;
    min-height: 50px; /* Evita que el layout "salte" */
    margin-bottom: 10px;
}
.hero-container .btn-lg {
    padding: 12px 30px;
    font-weight: 500;
}
.hero-container .btn-outline-light {
    font-weight: 200;
    color: var(--white);
    border-color: var(--white);
}
.hero-container .btn-outline-light:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: var(--white);
}
.scroll-down-arrow {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: var(--white);
    font-size: 1.5rem;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-15px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* --- 4. General Section & Typography --- */
.section {
    padding: 120px 0;
    position: relative; /* Añadido para que .logomr se posicione correctamente */
}
.section h2 {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-align: left;
    position: relative;
}
.section h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--secondary-color);
    margin: 15px 0;
}
.list-group-item {
    border: none;
    background-color: transparent;
    padding: 0.75rem 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}
.list-group-item i {
    margin-right: 10px;
    color: var(--primary-color);
}

/* --- 5. Card Styles (General) --- */
.card {
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: var(--white);
    height: 100%;
}
.card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}
.card-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 30px;
}

/* Estilos de tarjetas de servicio (usadas en Sobre Mí y Servicios) */
.service-card {
    background-color: var(--white);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease;
    height: 100%;
    padding: 0;
    text-align: left;
    overflow: hidden;
}
.service-card:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}
.service-card-img {
    width: 100%;
    height: 180px;
    overflow: hidden;
}
.service-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    transform: scale(1);
}
.service-card:hover .service-card-img img {
    transform: scale(1.1);
}
.service-card-body {
    padding: 1.5rem;
}
.service-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}
.service-card p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

/* Estilos tarjetas de iconos (Sobre Mí) */
.card-icons {
    border: none;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: rgba(255, 255, 255, 0.09); /* Fondo transparente */
    height: 100%;
}
.card-icons:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}
.card-icons p {
    background: var(--secondary-color);
    font-size: 1rem;
    font-weight: 400;
    color: var(--white);
    margin-bottom: 0px;
    padding: 5px;
    font-style: italic;
    letter-spacing: -1px;
}
.skill-icon-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 1rem !important;
    margin-top: 1rem !important;
}

/* --- 6. Section: Sobre Mí (#sobre-mi) --- */
.profile-image {
    max-width: 80%;
    height: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
#sobre-mi .btn-lg {
    padding: 12px 30px;
    font-weight: 100;
}

/* --- 7. Section: Servicios (#servicios) --- */
.parallax-section {
    position: relative;
    overflow: hidden;
    background-color: #222;
}
.parallax-content {
    position: relative;
    z-index: 4;
}
.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(230deg, rgba(94, 157, 175, 0.9) 0%, rgba(53, 110, 127, 0.9) 25%, rgba(14, 65, 80, 0.9) 46%, rgba(14, 65, 80, 0.9) 100%);
    z-index: 3;
}
.parallax-bg {
    position: absolute;
    left: 0;
    top: -25%;
    width: 100%;
    height: 150%;
    object-fit: cover;
    z-index: 1;
}
.parallax-fg { /* Esta clase no se usa en el HTML, pero la dejo por si acaso */
    position: absolute;
    width: auto;
    height: auto;
    object-fit: contain;
    z-index: 2;
}
.parallax-section h2,
.parallax-section p.lead {
    color: var(--white);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    text-align: center;
}
.parallax-section h2::after {
    background: var(--secondary-color);
    margin: 15px auto 0;
}

/* --- 8. Section: Proyectos (#proyectos) --- */
#proyectos .card ul {
    list-style: none;
    padding: 0;
}
#proyectos .card li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: flex-start;
}
#proyectos .card li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--primary-color);
    margin-right: 10px;
    margin-top: 4px;
}
.logomr { /* Logo de fondo en Proyectos */
    background-image: url(./images/MR_bgparallax2.png);
    opacity: 0.5;
    width: 100%;
    position: absolute;
    display: block;
    float: left;
    height: 100%;
    top: 0;      /* Añadido para posicionamiento */
    left: 0;     /* Añadido para posicionamiento */
    z-index: 0;  /* Añadido para enviarlo al fondo de la sección */
}
#proyectos .container {
        position: relative; /* Asegura que el contenido esté sobre .logomr */
        z-index: 1;
}


/* --- 9. Section: Contacto (#contacto) --- */
.video-bg-section {
    position: relative;
    overflow: hidden;
    background-color: #222;
}
.video-bg-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(230deg, rgba(94, 157, 175, 0.9) 0%, rgba(53, 110, 127, 0.9) 25%, rgba(14, 65, 80, 0.9) 46%, rgba(14, 65, 80, 0.9) 100%);
    z-index: 2;
}
.video-bg-section h2 {
    color: var(--white);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    text-align: center !important;
}
.video-bg-section h2::after {
    background: var(--secondary-color);
    margin: 15px auto 0;
}
#contacto .parallax-content { /* Hereda de .parallax-content */
    position: relative;
    z-index: 3;
}


/* --- 10. Footer --- */
footer {
    background-color: var(--primary-color);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--secondary-color);
}

/* Reemplaza el <br> con un margen */
footer .copyright {
    margin-bottom: 1rem; 
    color: var(--white);
}

/* Contenedor para alinear "Powered By" y el logo */
.powered-by-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px; /* Espacio entre el texto y el logo */
}

/* Quita el margen inferior del párrafo "Powered By" */
.powered-by-container p {
    margin-bottom: 0; 
    color: var(--white);
}

/* Estilo del logo (usando tus iniciales) */
.footer-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100px;
    height: auto;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--primary-color); /* Texto (MRA) */
    background-color: transparent;
    text-decoration: none;
    transition: all 0.3s ease;
}

/* Efecto HOVER para el logo */
.footer-logo:hover {
    transform: scale(1.1); /* Efecto sutil de zoom */
}

.footer-links {
    margin-top: 1rem; /* Espacio extra arriba */
    margin-bottom: 1rem; /* Espacio extra arriba */
    font-size: 0.8rem;
}
.footer-links a {
    color: var(--secondary-color); /* Mismo color cian */
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-links a:hover {
    color: var(--white); /* Cambia a blanco en hover */
    text-decoration: underline;
}
.footer-links span {
    margin: 0 10px; /* Separador */
    color: var(--secondary-color);
}

/* --- 11. Media Queries --- */
@media (max-width: 768px) {
    .navbar-transparent .nav-link {
        color: var(--text-dark) !important; /* Links oscuros en menú móvil */
        text-shadow: none;
    }
    .navbar-brand img,
    .navbar-transparent .navbar-brand img {
        height: 80px;
        filter: none; /* Logo siempre oscuro en móvil */
    }
    .hero-container h1 {
        font-size: 2.5rem;
    }
    .hero-container p {
        font-size: 1.1rem;
    }
    .hero-container .typed-text-container {
        font-size: 1.2rem;
        min-height: 120px;
    }
    .profile-image {
        max-width: 100%; /* Ajuste para móvil */
    }
}
@media (min-width: 992px) {
    .profile-image {
        max-width: 100%;
    }
}

/* --- 13. Cookie Banner --- */
.cookie-banner {
    position: fixed;
    bottom: -100%; /* Empieza oculto abajo */
    left: 0;
    width: 100%;
    background-color: var(--primary-color); /* Tu azul oscuro */
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999; /* Por encima de todo */
    transition: bottom 0.5s ease-in-out; /* Animación de entrada */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-banner.show {
    bottom: 0; /* Sube a su posición */
}

.cookie-banner .text-accent {
    color: var(--secondary-color) !important; 
    letter-spacing: 0px !important;
}
