/* ========================================
   CEMSA - Estilos principales
   Paleta: Vino consultivo + Dorado
======================================== */

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

:root {
    --vino: #7C2D12;
    --vino-claro: #9A3412;
    --vino-oscuro: #6B2108;
    --dorado: #D97706;
    --crema: #FFFBEB;
    --gris: #78716C;
    --gris-claro: #FAF9F7;
    --blanco: #FFFFFF;
    --negro: #1C1917;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    color: var(--negro);
    line-height: 1.7;
    background: var(--blanco);
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
}

/* ========================================
   Header
======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(124, 45, 18, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 70px;
    width: auto;
}

nav {
    display: flex;
    gap: 3rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--negro);
    font-weight: 500;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: color 0.3s;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--vino);
    color: var(--blanco);
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn:hover {
    background: var(--vino-oscuro);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 45, 18, 0.25);
}

.btn svg {
    width: 18px;
    height: 18px;
}

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

.btn-outline:hover {
    background: var(--vino);
    color: var(--blanco);
}

.btn-dorado {
    background: var(--dorado);
    color: var(--negro);
}

.btn-dorado:hover {
    background: #B45309;
    box-shadow: 0 10px 30px rgba(217, 119, 6, 0.25);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
}

.menu-toggle span {
    width: 26px;
    height: 2px;
    background: var(--vino);
}

/* ========================================
   Hero
======================================== */
.hero {
    padding: 12rem 2rem 8rem;
    background: linear-gradient(180deg, var(--gris-claro) 0%, var(--blanco) 100%);
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 45, 18, 0.2), transparent);
}

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

.hero-tag {
    display: inline-block;
    background: rgba(124, 45, 18, 0.1);
    color: var(--vino);
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3.25rem;
    font-weight: 600;
    color: var(--negro);
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--vino);
}

.hero p {
    font-size: 1.2rem;
    color: var(--gris);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-badges {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gris);
}

.hero-badge-icon {
    width: 48px;
    height: 48px;
    background: var(--crema);
    border: 2px solid rgba(124, 45, 18, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-badge-icon svg {
    width: 22px;
    height: 22px;
    color: var(--vino);
}

.hero-badge span {
    font-weight: 600;
    color: var(--negro);
    font-size: 0.9rem;
}

.hero-visual {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}

.hero-visual img {
    width: 100%;
    height: 480px;
    object-fit: cover;
}

.hero-visual-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(28, 25, 23, 0.9), transparent);
    padding: 2rem;
    color: var(--blanco);
}

.hero-visual-overlay h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.normas-list {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.norma-tag {
    background: rgba(217, 119, 6, 0.9);
    color: var(--negro);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ========================================
   Secciones
======================================== */
section {
    padding: 7rem 2rem;
}

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

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

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

.section-header h2 {
    font-size: 2.75rem;
    font-weight: 600;
    color: var(--negro);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gris);
}

/* ========================================
   Servicios
======================================== */
.servicios {
    background: var(--blanco);
}

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

.servicio-card {
    background: var(--gris-claro);
    overflow: hidden;
    transition: all 0.4s;
    position: relative;
}

.servicio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--vino);
    transition: height 0.4s;
}

.servicio-card:hover::before {
    height: 100%;
}

.servicio-card:hover {
    background: var(--blanco);
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.servicio-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.servicio-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.servicio-card:hover .servicio-img img {
    transform: scale(1.05);
}

.img-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--vino);
    color: var(--blanco);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.servicio-content {
    padding: 2rem;
}

.servicio-numero {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: rgba(124, 45, 18, 0.15);
    margin-bottom: 0.5rem;
}

.servicio-content h3 {
    font-size: 1.5rem;
    color: var(--negro);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.servicio-content h3 svg {
    width: 24px;
    height: 24px;
    color: var(--vino);
}

.servicio-content > p {
    color: var(--gris);
    margin-bottom: 1.5rem;
}

.servicio-lista {
    list-style: none;
}

.servicio-lista li {
    padding: 0.5rem 0;
    color: var(--negro);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.servicio-lista li svg {
    width: 16px;
    height: 16px;
    color: var(--vino);
    margin-top: 4px;
    flex-shrink: 0;
}

.normas-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.norma-badge {
    background: var(--crema);
    color: var(--vino);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(124, 45, 18, 0.2);
}

/* ========================================
   Metodología
======================================== */
.metodologia {
    background: var(--vino);
    color: var(--blanco);
}

.metodologia .section-tag {
    color: var(--dorado);
}

.metodologia .section-header h2 {
    color: var(--blanco);
}

.metodologia .section-header p {
    color: rgba(255,255,255,0.8);
}

.proceso-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-top: 4rem;
}

.proceso-timeline::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 10%;
    right: 10%;
    height: 2px;
    background: rgba(255,255,255,0.2);
}

.proceso-paso {
    text-align: center;
    flex: 1;
    position: relative;
    padding: 0 1rem;
}

.proceso-numero {
    width: 80px;
    height: 80px;
    background: var(--dorado);
    color: var(--negro);
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 1;
}

.proceso-paso h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-family: 'Source Sans 3', sans-serif;
}

.proceso-paso p {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
}

/* ========================================
   Sectores
======================================== */
.sectores {
    background: var(--gris-claro);
}

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

.sector-card {
    background: var(--blanco);
    overflow: hidden;
    text-align: center;
    transition: all 0.3s;
    border-bottom: 3px solid transparent;
}

.sector-card:hover {
    border-bottom-color: var(--vino);
    box-shadow: 0 15px 50px rgba(0,0,0,0.08);
    transform: translateY(-5px);
}

.sector-img {
    height: 180px;
    overflow: hidden;
}

.sector-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.sector-card:hover .sector-img img {
    transform: scale(1.05);
}

.sector-content {
    padding: 2rem;
}

.sector-icon {
    width: 60px;
    height: 60px;
    background: var(--crema);
    margin: -50px auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.sector-icon svg {
    width: 28px;
    height: 28px;
    color: var(--vino);
}

.sector-content h3 {
    font-size: 1.5rem;
    color: var(--negro);
    margin-bottom: 0.75rem;
}

.sector-content p {
    color: var(--gris);
    font-size: 0.95rem;
}

/* ========================================
   Nosotros
======================================== */
.nosotros {
    background: var(--blanco);
}

.nosotros-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: center;
}

.nosotros-text h2 {
    font-size: 2.5rem;
    color: var(--negro);
    margin-bottom: 1.5rem;
}

.nosotros-text > p {
    color: var(--gris);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

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

.valor-card {
    padding: 1.5rem;
    background: var(--gris-claro);
    border-left: 3px solid var(--vino);
}

.valor-card h4 {
    color: var(--negro);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.valor-card h4 svg {
    width: 20px;
    height: 20px;
    color: var(--vino);
}

.valor-card p {
    color: var(--gris);
    font-size: 0.9rem;
    margin-bottom: 0;
}

.nosotros-visual {
    position: relative;
}

.nosotros-card {
    background: var(--vino);
    color: var(--blanco);
    padding: 3rem;
}

.nosotros-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.nosotros-card p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.nosotros-dato {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.nosotros-dato svg {
    width: 24px;
    height: 24px;
    color: var(--dorado);
}

.nosotros-dato p {
    margin-bottom: 0;
}

/* ========================================
   CTA
======================================== */
.cta {
    background: var(--crema);
    text-align: center;
    position: relative;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(124, 45, 18, 0.3), transparent);
}

.cta h2 {
    font-size: 2.75rem;
    color: var(--negro);
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    color: var(--gris);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Contacto
======================================== */
.contacto {
    background: var(--blanco);
}

.contacto-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.contacto-card {
    background: var(--crema);
    padding: 2rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(124, 45, 18, 0.1);
}

a.contacto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(124, 45, 18, 0.1);
    border-color: rgba(124, 45, 18, 0.2);
}

.contacto-card-icon {
    width: 65px;
    height: 65px;
    background: var(--vino);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.contacto-card-icon svg {
    width: 28px;
    height: 28px;
    color: var(--blanco);
}

.contacto-card h4 {
    color: var(--negro);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: 'Source Sans 3', sans-serif;
}

.contacto-card span {
    color: var(--gris);
    font-size: 0.95rem;
}

/* ========================================
   Footer
======================================== */
footer {
    background: var(--negro);
    color: var(--blanco);
    padding: 5rem 2rem 2rem;
}

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

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

.footer-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 1.5rem;
}

/* Contacto CTA */
.contacto-cta {
    background: var(--gris-claro);
    padding: 3rem;
    text-align: center;
}

.contacto-cta h3 {
    font-size: 1.5rem;
    color: var(--negro);
    margin-bottom: 0.5rem;
}

.contacto-cta > p {
    color: var(--gris);
    margin-bottom: 2rem;
}

.contacto-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-brand p {
    color: #A8A29E;
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    color: var(--blanco);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #A8A29E;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--dorado);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #292524;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #A8A29E;
    font-size: 0.9rem;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 1024px) {
    .servicios-grid {
        grid-template-columns: 1fr;
    }

    .sectores-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 968px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--blanco);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: 0 20px 40px rgba(0,0,0,0.08);
    }

    nav.active {
        display: flex;
    }

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

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-visual {
        max-width: 500px;
        margin: 0 auto;
    }

    .proceso-timeline {
        flex-direction: column;
        gap: 2rem;
    }

    .proceso-timeline::before {
        display: none;
    }

    .nosotros-content {
        grid-template-columns: 1fr;
    }

    .contacto-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 9rem 1.5rem 5rem;
    }

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

    .hero-badges {
        flex-direction: column;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .sectores-grid {
        grid-template-columns: 1fr;
    }

    .valores-grid {
        grid-template-columns: 1fr;
    }

    .contacto-cards {
        grid-template-columns: 1fr;
    }

    .footer-main {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    section {
        padding: 4rem 1.5rem;
    }
}
