/* ============================================
   CONSORCIO EMPRESARIAL IPO - ESTILO CONSULTORÍA PREMIUM
   Paleta: Slate/Índigo profesional + Teal accent + Gold touch
   Layout: Cards con íconos, grid moderno
   ============================================ */
:root {
    /* Primary Slate Palette */
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-700: #334155;
    --slate-600: #475569;
    --slate-500: #64748b;
    --slate-400: #94a3b8;
    --slate-300: #cbd5e1;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;

    /* Accent Teal Palette */
    --teal: #0f766e;
    /* Darker, more corporate teal */
    --teal-dark: #115e59;
    --teal-light: #2dd4bf;
    /* Vibrant for highlights */
    --teal-50: #f0fdfa;

    /* Secondary Accent (Gold/Sand) for premium touch */
    --gold: #d4a373;
    --gold-light: #faedcd;

    --white: #ffffff;
    --font-heading: 'Libre Baskerville', Georgia, serif;
    --font-body: 'Outfit', system-ui, sans-serif;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius: 8px;
    --radius-sm: 4px;
    --transition: cubic-bezier(0.4, 0, 0.2, 1) 150ms;
}

/* ============================================
   RESET & BASE
   ============================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--slate-600);
    line-height: 1.6;
    font-size: 16px;
    /* Slightly larger base font */
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ============================================
   CSS ICONS
   ============================================ */
.icon-phone::before,
.icon-mail::before,
.icon-clock::before,
.icon-map::before,
.icon-arrow::before {
    display: inline-block;
    font-style: normal;
    margin-right: 6px;
}

.icon-phone::before {
    content: "\260E";
}

.icon-mail::before {
    content: "\2709";
}

.icon-clock::before {
    content: "\23F0";
}

.icon-map::before {
    content: "\25CB";
}

.icon-arrow::before {
    content: "\2192";
    margin-right: 0;
    margin-left: 8px;
    font-weight: bold;
}

/* ============================================
   TOP BAR
   ============================================ */
.top-bar {
    background: var(--slate-900);
    color: var(--slate-300);
    font-size: 0.85rem;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar-left {
    display: flex;
    gap: 24px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.top-bar a {
    color: var(--slate-300);
    transition: color 0.2s;
}

.top-bar a:hover {
    color: var(--teal-light);
}

/* ============================================
   HEADER
   ============================================ */
#header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

#header.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    /* Taller header */
}

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

.logo-img {
    height: 48px;
    width: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-900);
    letter-spacing: -0.01em;
}

#nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

#nav a {
    padding: 8px 16px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--slate-600);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

#nav a:hover {
    color: var(--teal);
    background: var(--slate-50);
}

#nav a.active {
    color: var(--teal);
    font-weight: 600;
}

#nav .nav-cta {
    background: var(--teal);
    color: var(--white);
    padding: 10px 24px;
    border-radius: 4px;
    font-weight: 600;
    margin-left: 12px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

#nav .nav-cta:hover {
    background: var(--teal-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--slate-800);
    transition: all 0.3s;
    border-radius: 2px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 4px;
    /* Sharper corners for corporate look */
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-primary {
    background: var(--teal);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(15, 118, 110, 0.2);
}

.btn-primary:hover {
    background: var(--teal-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(15, 118, 110, 0.3);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
    background: var(--white);
    color: var(--teal-dark);
    border-color: var(--white);
}

.btn-dark {
    background: var(--slate-800);
    color: var(--white);
}

.btn-dark:hover {
    background: var(--slate-900);
    transform: translateY(-1px);
}

.btn-text {
    display: inline-flex;
    align-items: center;
    color: var(--teal);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: auto;
}

.btn-text:hover {
    color: var(--teal-dark);
    text-decoration: underline;
}

/* ============================================
   HERO - Corporate & Modern
   ============================================ */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    overflow: hidden;
    color: var(--white);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(45, 212, 191, 0.1), transparent 60%);
    pointer-events: none;
}

.hero-pattern {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.5;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 10;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    color: var(--teal-light);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    text-transform: uppercase;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 24px;
}

.hero h1 span {
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    background-image: linear-gradient(to right, var(--teal-light), #fff);
}

.hero p {
    font-size: 1.2rem;
    color: var(--slate-300);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 540px;
    font-weight: 300;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.hero-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border-left: 4px solid var(--teal);
    padding: 24px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s;
}

.hero-stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.hero-stat-card h3 {
    font-family: var(--font-body);
    /* Modern number font */
    font-size: 3rem;
    color: var(--white);
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1;
}

.hero-stat-card p {
    font-size: 0.9rem;
    color: var(--slate-400);
    margin: 8px 0 0;
    max-width: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* ============================================
   PAGE HERO (For internal pages)
   ============================================ */
.page-hero {
    padding: 120px 0 80px;
    background: var(--slate-900);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(15, 118, 110, 0.2), transparent 70%);
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--white);
    margin-bottom: 16px;
    position: relative;
}

.page-hero p {
    color: var(--slate-300);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

/* ============================================
   SERVICIOS
   ============================================ */
.servicios {
    padding: 120px 0;
    background: var(--slate-50);
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--teal-50);
    color: var(--teal);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
    border-radius: 4px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 20px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--slate-500);
    max-width: 600px;
    margin: 0 auto;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

.servicio-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.servicio-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.servicio-card-body {
    padding: 32px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    background: var(--white);
    /* Ensure it covers text when zoomed */
}

.servicio-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-8px);
    border-color: transparent;
}

.servicio-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate-900);
    color: var(--white);
    border-radius: 50%;
    font-size: 1.2rem;
    margin-bottom: 24px;
    margin-top: -60px;
    /* Pull up to overlap image */
    position: relative;
    box-shadow: var(--shadow-md);
    border: 4px solid var(--white);
}

.servicio-card:hover .servicio-icon {
    background: var(--teal);
}

.servicio-card h3 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 12px;
}

.servicio-card p {
    font-size: 0.95rem;
    color: var(--slate-500);
    margin-bottom: 20px;
}

.servicio-card ul {
    margin-top: 10px;
    margin-bottom: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--slate-100);
}

.servicio-card ul li {
    font-size: 0.9rem;
    color: var(--slate-600);
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.servicio-card ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 6px;
    height: 6px;
    background: var(--teal);
    border-radius: 50%;
}

/* ============================================
   NOSOTROS
   ============================================ */
.nosotros {
    padding: 120px 0;
    background: var(--white);
}

.nosotros-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
}

.nosotros-img {
    width: 100%;
    border-radius: 4px;
    box-shadow: var(--shadow-xl);
    margin-bottom: 0;
}

.nosotros-text h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 24px;
    line-height: 1.2;
}

.nosotros-text p {
    font-size: 1.05rem;
    color: var(--slate-600);
    margin-bottom: 20px;
    text-align: justify;
}

.nosotros-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 32px;
}

.nosotros-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--slate-800);
}

.nosotros-feature::before {
    content: '\2713';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: var(--teal);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.nosotros-sidebar {
    background: var(--slate-50);
    padding: 40px;
    border-left: 4px solid var(--teal);
}

.nosotros-sidebar-stat {
    padding: 24px 0;
    border-bottom: 1px solid var(--slate-200);
}

.nosotros-sidebar-stat:first-child {
    padding-top: 0;
}

.nosotros-sidebar-stat:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.nosotros-sidebar-stat h3 {
    font-family: var(--font-body);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1;
    margin-bottom: 4px;
}

.nosotros-sidebar-stat span {
    font-size: 0.9rem;
    color: var(--slate-500);
    font-weight: 500;
    text-transform: uppercase;
}

/* ============================================
   CTA & FOOTER
   ============================================ */
.cta-section {
    padding: 100px 0;
    background: var(--teal-dark);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-section .section-tag {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cta-section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--white);
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 1;
}

.footer {
    background: var(--slate-900);
    color: var(--slate-400);
    padding: 80px 0 0;
    border-top: 1px solid var(--slate-800);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand .logo-text {
    color: var(--white);
    font-size: 1.4rem;
}

.footer h4 {
    color: var(--white);
}

/* ============================================
   CONTACT
   ============================================ */
.contacto-info {
    padding-right: 40px;
}

.contacto-dato-icon {
    background: var(--teal);
    color: var(--white);
}

.form-group label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea,
.form-group select {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    padding: 14px;
}

.form-group input:focus,
.form-group textarea:focus {
    background: var(--white);
    border-color: var(--teal);
    box-shadow: 0 0 0 4px var(--teal-50);
}

/* ============================================
   ANIMATIONS & UTILS
   ============================================ */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

@media (max-width: 900px) {

    .hero-grid,
    .nosotros-grid,
    .contacto-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .hero {
        min-height: auto;
        padding: 120px 0 80px;
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero::before {
        width: 100%;
        height: 50%;
        bottom: 0;
        top: auto;
    }

    .hamburger {
        display: flex;
    }

    #nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px 24px;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    #nav.open {
        right: 0;
    }

    #nav a {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid var(--slate-100);
        border-radius: 0;
    }

    #nav .nav-cta {
        margin: 24px 0 0;
        text-align: center;
        width: 100%;
    }

    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
        z-index: 999;
    }

    .nav-overlay.open {
        opacity: 1;
        visibility: visible;
    }
}