/* --- Variables Globales y Reset --- */
:root {
    --bg-color: #112240;
    --text-color: #f0f0f0;
    --accent-color: #4A90E2;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Poppins', sans-serif;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-sans);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAAp4XiDAAAAUVBMVEWFhYWDg4N3d3dtbW17e3t1dHTZ2dnu7u7X19fHx8fLy8vReGfVAAAATElEQVRIx+3MyQEAIAwDMCid/6g2lQskhA9f4gAUz1X/2Yd8wz/4B3/wD/7BH/wD/8Af/IP/8A/+wR/8g//wD/7BH/yL/wZg5gG5R2MwbwAAAABJRU5ErkJggg==');
    opacity: 0.05;
    pointer-events: none;
    z-index: -1;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Cabecera y Navegación --- */
.header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    padding: 2rem 0;
    z-index: 100;
    background-color: #112240;;
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 500;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    cursor: pointer;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.main-nav .nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 1.5px;
    position: relative;
    padding-bottom: 5px;
    cursor: pointer;
}

.main-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background: var(--text-color);
    bottom: 0; left: 0;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease-out;
}

.main-nav .nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.main-nav .nav-link.active::before {
    content: '•';
    color: var(--accent-color);
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1rem;
}

/* --- Contenido Principal --- */
#main-content {
    width: 100%;
    min-height: 100vh;
    transition: opacity 0.3s ease-in-out;
}

#main-content.fade-out {
    opacity: 0;
}

.home-section {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 50% 50%;
    align-items: center;
    position: relative;
}

.visual-column {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: radial-gradient(circle at center, rgba(74, 144, 226, 0.08) 0%, transparent 70%);
    overflow: hidden;
}

.content-column {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 5%;
    z-index: 10;
}

.text-block {
    position: absolute;
    width: 40%;
    opacity: 0;
}

.text-block h2 {
    font-family: var(--font-serif);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.text-block p {
    font-size: 1rem;
    line-height: 1.6;
    max-width: 400px;
}

.info-item {
    font-family: var(--font-sans);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}


/* Estilos para las imágenes */
.image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 1;
}

.image-container:hover img {
    transform: perspective(1000px) rotateY(18deg) rotateX(6deg) scale(1.02);
}

.visual-column .image-container {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Estilos específicos para la imagen de home */
.home-section .image-container {
    max-width: 700px;
    max-height: 600px;
    margin: 0 auto;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.home-section .image-container img {
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    transform: perspective(1000px) rotateY(15deg) rotateX(5deg);
    transform-origin: center center;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.visual-column {
    position: relative;
    height: 100vh;
}

.generic-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 10rem 2rem;
    animation: fadeIn 0.5s ease-in-out;
}
.generic-page .image-container {
    width: 100%;
    height: 50vh;
    margin-bottom: 2rem;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.generic-page .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

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

.generic-page h1 {
    font-family: var(--font-serif);
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.generic-page p {
    max-width: 600px;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Botón primario / CTA */
.btn {
    display: inline-block;
    padding: 0.9rem 1.4rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary {
    background: var(--accent-color);
    color: #0a1424;
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(74, 144, 226, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(74, 144, 226, 0.25);
}

.btn-cta {
    margin-top: 1.25rem;
    width: fit-content;
}

.footer {
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease-in-out;
    opacity: 0;
    transform: translateY(20px);
}

.footer.show {
    opacity: 1;
    transform: translateY(0);
}

/* --- Sección de Servicios --- */
.services-page {
    min-height: 100vh;
    padding: 8rem 2rem 4rem;
    background: var(--bg-color);
}

.services-header {
    text-align: center;
    margin-bottom: 4rem;
}

.services-header h1 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.services-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), #64B5F6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px rgba(74, 144, 226, 0.2);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    display: block;
}

.service-card h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.service-card p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.feature-tag {
    background: rgba(74, 144, 226, 0.2);
    color: var(--accent-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(74, 144, 226, 0.3);
}

/* Estado animado de las cards */
.service-card.animated {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* --- Página de Contacto --- */
.contact-page {
    min-height: 100vh;
    padding: 8rem 2rem 4rem;
    background: var(--bg-color);
}

.contact-page .contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-header {
    text-align: center;
    margin-bottom: 4rem;
}

.contact-header h1 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact-header p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
    margin: 0 auto;
}

.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Proceso de Desarrollo */
.process-section h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.process-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.process-step {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.process-step:hover {
    transform: translateX(10px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.1);
}

.step-number {
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    color: var(--bg-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.step-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

/* Misión y Visión */
.mission-vision {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mission, .vision {
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mission h3, .vision h3 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.mission p, .vision p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.values-btn {
    margin-top: 1.25rem;
    width: fit-content;
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 1rem;
    letter-spacing: 0.3px;
    border: 2px solid transparent;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.values-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, var(--accent-color), #5a9fd4);
}

/* --- Formulario de Contacto --- */
.contact-page .form-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-page .form-container h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.contact-page .contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-page .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-page .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-page .form-group label {
    font-weight: 500;
    color: var(--text-color);
    font-size: 0.9rem;
}

.contact-page .form-group input,
.contact-page .form-group select,
.contact-page .form-group textarea {
    padding: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-page .form-group input:focus,
.contact-page .form-group select:focus,
.contact-page .form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

.contact-page .form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-page .form-group input::placeholder,
.contact-page .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* --- Información de Contacto --- */
.contact-page .contact-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
}

.contact-page .contact-info h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.contact-page .info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.contact-page .info-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.contact-page .info-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bg-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-page .info-content h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.contact-page .info-content p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
    margin: 0;
}

.contact-page .info-content a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-page .info-content a:hover {
    color: #5a9fd4;
}

.contact-page .social-links {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-page .social-links h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.contact-page .social-icons {
    display: flex;
    gap: 1rem;
}

.contact-page .social-link {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.contact-page .social-link:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 144, 226, 0.3);
}

/* Asegurar que el botón de contacto tenga el mismo estilo que el CTA de home */
.contact-page .btn-cta {
    margin-top: 1.25rem;
    width: fit-content;
    background: var(--accent-color);
    color: #0a1424;
    box-shadow: 0 8px 24px rgba(74, 144, 226, 0.25);
    border: none;
    border-radius: 6px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    font-family: var(--font-sans);
}

.contact-page .btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(74, 144, 226, 0.35);
}

.contact-page .btn-cta:active {
    transform: translateY(0);
    box-shadow: 0 6px 18px rgba(74, 144, 226, 0.25);
}

/* Popup de Valores */
.values-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.values-popup.show {
    display: flex;
}

.popup-content {
    background: var(--bg-color);
    border-radius: 16px;
    padding: 2rem;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popup-header h2 {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--text-color);
}

.popup-close {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent-color);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.value-item {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.value-item:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 30px rgba(74, 144, 226, 0.1);
}

.value-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.value-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.value-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* --- Responsividad --- */
@media (max-width: 768px) {
    .header .container { flex-direction: column; gap: 1.5rem; }
    .main-nav ul { gap: 1.5rem; }
    .home-section { 
        grid-template-columns: 1fr; 
        min-height: 100vh;
        gap: 2rem;
    }

    .content-column {
        height: auto;
        padding: 3rem 5% 2rem;
        text-align: center;
        order: 2;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .visual-column {
        height: 45vh;
        min-height: 300px;
        order: 1;
        padding: 2rem 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 200px;
    }
    
    .text-block {
        position: relative;
        width: 100%;
        opacity: 1;
        margin-bottom: 1.5rem;
    }

    .generic-page h1 { font-size: 2.5rem; }
    
    /* Imagen limpia en móviles */
    .home-section .image-container {
        max-width: 100%;
        max-height: 400px;
        padding: 0;
        margin: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    .home-section .image-container img {
        transform: perspective(800px) rotateY(8deg) rotateX(2deg);
        width: 100%;
        height: auto;
    }
    
    .btn-cta {
        margin: 1.5rem auto 0;
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    /* Responsive para servicios */
    .services-page {
        padding: 6rem 1rem 3rem;
    }
    
    .services-header h1 {
        font-size: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 2rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
    
    /* Responsive para contacto */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-header h1 {
        font-size: 2.5rem;
    }
    
    .process-section h2 {
        font-size: 2rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    /* Responsive para contacto */
    .contact-page .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-page .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-page .form-container,
    .contact-page .contact-info {
        padding: 2rem;
    }
}

/* Pantallas muy pequeñas */
@media (max-width: 480px) {
    .home-section {
        gap: 1.5rem;
    }
    
    .visual-column {
        height: 40vh;
        min-height: 250px;
    }

    .home-section .image-container {
        max-height: 250px;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
    }
    
    .home-section .image-container img {
        transform: perspective(600px) rotateY(5deg) rotateX(1deg);
        width: 100%;
        height: auto;
        max-height: 100%;
        object-fit: contain;
    }
    
    .btn-cta {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .text-block h2 {
        font-size: 2rem;
    }
    
    .text-block p {
        font-size: 0.9rem;
    }
}
