:root {
    /* Variables de Color */
    --color-primary: #0f3460;
    --color-secondary: #16213e;
    --color-accent: #c19a6b;
    --color-text: #2d3748;
    --color-text-light: #64748b;
    --color-bg: #ffffff;
    --color-bg-alt: #f8fafc;
    --color-border: #e2e8f0;
    /* Tipografía */
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Manrope', sans-serif;
    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

/* --- Utilidades --- */
p,
.service-description,
.team-bio,
.value-description {
    text-align: justify;
}

/* Animaciones Globales */
@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, -30px) scale(1.05);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes rotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Componentes --- */
/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

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

.logo-link {
    display: block;
    line-height: 0;
}

.logo-image {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}

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

.nav a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-primary);
    cursor: pointer;
}

/* Hero Section */
.hero {
    margin-top: 80px;
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f3460 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(193, 154, 107, 0.15) 0%, transparent 50%), radial-gradient(circle at 80% 80%, rgba(193, 154, 107, 0.1) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
}

.hero-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg) 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.3s;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-accent);
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(193, 154, 107, 0.3);
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero Visual*/
.hero-visual {
    opacity: 0;
    animation: fadeInRight 1s ease forwards 0.6s;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.hero-logo {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.3));
    /* Recorte en el logo */
    clip-path: inset(0 20px 20px 0);
}

.hero-decorative {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    border: 2px solid rgba(193, 154, 107, 0.1);
    border-radius: 50%;
    animation: rotate 30s linear infinite;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    background: var(--color-accent);
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(193, 154, 107, 0.3);
}

.hero-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(193, 154, 107, 0.4);
    background: #d4ab7a;
}

/* Secciones Generales */
.section {
    padding: var(--spacing-xl) 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: var(--spacing-lg);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--color-accent);
}

/* Nosotros */
.about {
    background: white;
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image-container {
    width: 100%;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.about-image:hover {
    transform: scale(1.02);
}

@media (max-width:900px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .about-image-container {
        max-width: 600px;
        margin: 0 auto;
    }
}

.about-text {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 2rem;
}

/* Valores */
.values {
    padding: var(--spacing-xl) 2rem;
    background: var(--color-bg-alt);
}

.values-container {
    max-width: 1400px;
    margin: 0 auto;
}

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

.value-item {
    text-align: center;
    padding: 2.5rem 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.value-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    transform: scaleX(0);
    transition: var(--transition);
}

.value-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.value-item:hover::before {
    transform: scaleX(1);
}

.value-number {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-accent);
    opacity: 0.2;
    line-height: 1;
    margin-bottom: 1rem;
}

.value-title {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.value-description {
    font-size: 1rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

/* Servicios */
.services {
    background: var(--color-bg);
}

.services-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 4rem;
}

.service-item {
    flex: 0 1 350px;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.service-image-container {
    height: 220px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.service-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-item:hover .service-image {
    transform: scale(1.05);
}

.service-keyword {
    position: absolute;
    bottom: 20px;
    right: 0;
    background: var(--color-accent);
    color: white;
    padding: 0.5rem 1.5rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    box-shadow: -5px 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px 0 0 4px;
}

.service-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex-grow: 1;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.service-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-border);
    line-height: 1;
}

.service-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.service-description {
    font-size: 0.95rem;
    color: var(--color-text);
    line-height: 1.7;
}

/* Equipo */
.team {
    background: var(--color-bg-alt);
    padding: var(--spacing-xl) 2rem;
}

.team-container {
    max-width: 1400px;
    margin: 0 auto;
}

.team-member {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 4rem;
    margin-top: 4rem;
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    align-items: center;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.team-photo {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    clip-path: inset(0 0 20px 0 round 10px);
}

.team-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-name {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.team-role {
    font-size: 1.2rem;
    color: var(--color-accent);
    font-weight: 600;
}

.team-bio {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.8;
}

/* Clientes */
.clients {
    padding: var(--spacing-xl) 2rem;
    background: white;
}

.clients-container {
    max-width: 1400px;
    margin: 0 auto;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
    align-items: center;
}

.client-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: var(--color-bg-alt);
    border-radius: 10px;
    transition: var(--transition);
    border: 1px solid var(--color-border);
    height: 130px;
}

.client-logo:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Por si el logo del cliente es blanco */
.client-logo.dark-hover:hover {
    background-color: #000000;
}

.client-logo img {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.client-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Contacto */
.contact {
    padding: var(--spacing-xl) 2rem;
    background: var(--color-primary);
    color: white;
}

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

.contact-info h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-details p {
    font-size: 1rem;
    line-height: 0.9;
    color: white;
}

.contact-details strong {
    color: var(--color-bg);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.contact-details a {
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition);
}

.contact-details a:hover {
    color: var(--color-bg);
}

.social-links {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.social-link-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: white;
    transition: var(--transition);
}

.social-link-item:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.social-icon {
    height: 20px;
    width: auto;
    display: block;
    /* Filtro para garantizar que sea blanco si el SVG es negro */
    /* filter:brightness(0) invert(1);*/
}

.contact-map {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
    min-height: 400px;
}

.contact-map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* Footer */
.footer {
    background: var(--color-secondary);
    color: rgba(255, 255, 255, 0.8);
    padding: 2rem;
    text-align: center;
}

.footer p {
    text-align: center;
    margin: 0;
}

/* --- estilos default para los componentes --- */
.read-more-btn {
    display: none;
}

/* --- Diseño responsivo --- */
@media (max-width:1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 4rem 1.5rem;
    }

    .hero-visual {
        padding-left: 0;
        margin-top: 2rem;
        display: flex;
        justify-content: center;
    }

    .hero-logo {
        max-width: 300px;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-member {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .service-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Equipo - perfil profesional*/
    .team-bio {
        display: none;
    }

    .read-more-btn {
        display: inline-block;
        margin-top: 1rem;
        padding: 0.5rem 1.5rem;
        background-color: var(--color-accent);
        color: white;
        border: none;
        border-radius: 5px;
        font-family: var(--font-body);
        font-weight: 600;
        cursor: pointer;
        transition: var(--transition);
    }

    .read-more-btn:hover {
        background-color: #d4ab7a;
        transform: translateY(-2px);
    }
}

/* estilos modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    overflow: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: 20px;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    animation: slideDown 0.4s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
    z-index: 10;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--color-primary);
    text-decoration: none;
    cursor: pointer;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
}

.modal-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto;
    border: 3px solid var(--color-accent);
}

.modal-name {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 0;
}

.modal-role {
    font-size: 1.1rem;
    color: var(--color-accent);
    font-weight: 600;
    text-align: center;
    margin-top: -0.5rem;
}

.modal-bio {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    text-align: justify;
}

@media (max-width:768px) {
    .hero {
        min-height: auto;
        padding-bottom: 4rem;
    }

    .hero::before,
    .hero-decorative {
        display: none;
    }

    /* Ocultar elementos decorativos */
    .hero-content {
        padding: 6rem 1rem 3rem 1rem;
        gap: 1.5rem;
    }

    .nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
        padding-top: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .clients-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 2rem;
        padding-top: 1rem;
        gap: 1.5rem;
        scrollbar-width: thin;
        scrollbar-color: var(--color-accent) transparent;
    }

    .client-logo {
        min-width: 150px;
        scroll-snap-align: center;
        flex-shrink: 0;
    }

    .clients-grid::-webkit-scrollbar {
        height: 4px;
    }

    .clients-grid::-webkit-scrollbar-track {
        background: transparent;
    }

    .clients-grid::-webkit-scrollbar-thumb {
        background-color: var(--color-accent);
        border-radius: 4px;
    }

    /* Menú Móvil Activo (Menu hamburguesa)*/
    .nav.active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 90px;
        left: 0;
        right: 0;
        background: white;
        padding: 1rem;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--color-border);
        z-index: 1000;
        animation: slideDown 0.3s ease forwards;
    }

    .nav.active li {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }

    .hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 0 1rem;
    }

    .hero-logo {
        width: 80vw;
        max-width: none;
        height: auto;
        margin-left: 30px;
    }

    .hero-subtitle {
        font-size: 3.5vw;
        letter-spacing: 0.05em;
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .hero-title {
        font-size: 8vw;
        line-height: 1.2;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    .hero-description {
        font-size: 4vw;
        padding: 0 0.5rem;
        overflow-wrap: break-word;
        max-width: 100%;
    }
}

@media (max-width:1024px) {
    .team-role {
        text-align: center !important;
    }
}