/* ============================================
   Triple D Consultores - Stylesheet
   ============================================ */

:root {
    --primary: #1a2855;
    --primary-dark: #0f1a3a;
    --primary-light: #2a3d75;
    --accent: #7e3fb5;
    --accent-light: #9d5cd6;
    --green: #2d8659;
    --green-light: #4caf7c;
    --green-dark: #1e5d3d;
    --text-dark: #1a1a2e;
    --text-medium: #4a5568;
    --text-light: #718096;
    --bg-light: #f7f9fc;
    --bg-gray: #edf2f7;
    --white: #ffffff;
    --whatsapp: #25d366;
    --whatsapp-dark: #1da851;
    --shadow-sm: 0 2px 8px rgba(26, 40, 85, 0.08);
    --shadow-md: 0 8px 24px rgba(26, 40, 85, 0.12);
    --shadow-lg: 0 20px 50px rgba(26, 40, 85, 0.18);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden;
}

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

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

ul {
    list-style: none;
}

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

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.25;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }

p { color: var(--text-medium); }

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: var(--white);
    box-shadow: 0 6px 20px rgba(45, 134, 89, 0.35);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(45, 134, 89, 0.45);
    background: linear-gradient(135deg, var(--green-light) 0%, var(--green) 100%);
}

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

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-3px);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    background: var(--green);
    color: var(--white);
    transform: translateY(-3px);
}

/* ============================================
   Top Bar
   ============================================ */
.top-bar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.85rem;
}

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

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

.top-bar-info span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.top-bar-info svg { opacity: 0.8; }

/* ============================================
   Header
   ============================================ */
.header {
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header.scrolled {
    padding: 0;
    box-shadow: var(--shadow-md);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

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

.logo {
    height: 60px;
    width: auto;
    transition: var(--transition);
}

.header.scrolled .logo { height: 50px; }

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo-name {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.logo-sub {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
}

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

.nav a {
    display: block;
    padding: 10px 16px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
    border-radius: 8px;
    position: relative;
}

.nav a:hover {
    color: var(--green);
    background: var(--bg-light);
}

.nav-cta {
    background: var(--green) !important;
    color: var(--white) !important;
    padding: 10px 24px !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 14px rgba(45, 134, 89, 0.3);
}

.nav-cta:hover {
    background: var(--green-dark) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
}

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

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ============================================
   Hero
   ============================================ */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    color: var(--white);
    background: url('images/hero.jpg') center/cover no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(15, 26, 58, 0.92) 0%,
        rgba(26, 40, 85, 0.85) 50%,
        rgba(45, 134, 89, 0.7) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding-top: 60px;
    padding-bottom: 60px;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 24px;
    font-weight: 800;
    line-height: 1.15;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero p {
    color: rgba(255, 255, 255, 0.95);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    margin-bottom: 36px;
    max-width: 750px;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.hero p strong { color: var(--white); font-weight: 700; }

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s backwards;
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.hero-scroll a {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    opacity: 0.7;
}

.hero-scroll a:hover { opacity: 1; }

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -15px); }
    60% { transform: translate(-50%, -8px); }
}

/* ============================================
   Stats
   ============================================ */
.stats {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

.stats::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
    opacity: 0.3;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
    color: var(--white);
    padding: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
}

.stat-item:last-child { border-right: none; }

.stat-number {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--white) 0%, var(--green-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.4;
}

/* ============================================
   Sections General
   ============================================ */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: var(--white);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-header h2 {
    margin-bottom: 16px;
    position: relative;
}

.section-header h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, var(--green) 0%, var(--accent) 100%);
    border-radius: 4px;
    margin: 20px auto 0;
}

.section-header.light .section-tag {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.section-header.light h2 { color: var(--white); }
.section-header.light p { color: rgba(255, 255, 255, 0.85); }

/* ============================================
   Nosotros
   ============================================ */
.nosotros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.nosotros-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.nosotros-image img {
    width: 100%;
    height: 560px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.nosotros-image:hover img { transform: scale(1.05); }

.nosotros-badge {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: var(--white);
    padding: 20px 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.nosotros-badge strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.nosotros-badge span {
    display: block;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-top: 4px;
    opacity: 0.9;
}

.nosotros-content .section-tag { margin-bottom: 16px; }
.nosotros-content h2 { margin-bottom: 24px; }
.nosotros-content p { margin-bottom: 18px; }

.mision-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 36px;
}

.mv-item {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius);
    border-left: 4px solid var(--green);
    transition: var(--transition);
}

.mv-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.mv-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mv-item h4 {
    color: var(--primary);
    margin-bottom: 6px;
    font-size: 1.05rem;
}

.mv-item p { font-size: 0.9rem; margin: 0; }

/* ============================================
   Servicios
   ============================================ */
.servicios {
    background: var(--bg-light);
    position: relative;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.servicio-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.servicio-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

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

.servicio-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 50%, rgba(26, 40, 85, 0.4) 100%);
}

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

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

.servicio-body {
    padding: 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.servicio-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: var(--white);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -60px;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
    box-shadow: 0 6px 20px rgba(45, 134, 89, 0.4);
    transition: var(--transition);
}

.servicio-card:hover .servicio-icon {
    transform: rotate(-8deg) scale(1.08);
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
}

.servicio-body h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.15rem;
}

.servicio-body p {
    flex: 1;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.servicio-link {
    display: inline-block;
    color: var(--green);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.servicio-link:hover { color: var(--accent); transform: translateX(4px); }

/* ============================================
   Trámites
   ============================================ */
.tramites-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.tramite-area {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(26, 40, 85, 0.08);
}

.tramite-area:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.tramite-header {
    position: relative;
    height: 180px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tramite-header-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 40, 85, 0.85) 0%, rgba(45, 134, 89, 0.75) 100%);
}

.tramite-header-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
}

.tramite-icon-circle {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.tramite-header-content h3 {
    color: var(--white);
    font-size: 1.5rem;
}

.tramite-list {
    padding: 30px;
}

.tramite-list li {
    position: relative;
    padding-left: 30px;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--bg-gray);
    font-size: 0.95rem;
    color: var(--text-medium);
}

.tramite-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tramite-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(45, 134, 89, 0.3);
}

.tramite-list li::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 12px;
    width: 8px;
    height: 4px;
    border-left: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(-45deg);
}

.tramites-note {
    text-align: center;
    margin-top: 40px;
    font-style: italic;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* ============================================
   Valores
   ============================================ */
.valores {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.valores::before, .valores::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.valores::before {
    width: 400px;
    height: 400px;
    top: -150px;
    left: -150px;
    background: radial-gradient(circle, rgba(45, 134, 89, 0.3) 0%, transparent 70%);
}

.valores::after {
    width: 500px;
    height: 500px;
    bottom: -200px;
    right: -200px;
    background: radial-gradient(circle, rgba(126, 63, 181, 0.3) 0%, transparent 70%);
}

.valores .container { position: relative; z-index: 2; }

/* Flexbox: 3 tarjetas arriba, 2 abajo centradas (efecto pirámide invertida).
   Cada tarjeta tiene ancho fijo; al haber 5 elementos y solo caber 3 por fila,
   los últimos 2 wrappean y quedan centrados por justify-content. */
.valores-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.valores-grid .valor-card {
    flex: 0 0 calc((100% - 48px) / 3);
    max-width: calc((100% - 48px) / 3);
    box-sizing: border-box;
}

.valor-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 36px 28px;
    border-radius: var(--radius-lg);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.valor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--green-light), var(--accent-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.valor-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

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

.valor-num {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--green-light) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}

.valor-card h4 {
    color: var(--white);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.valor-card p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.92rem;
    margin: 0;
}

/* ============================================
   CTA Banner
   ============================================ */
.cta-banner {
    padding: 100px 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    color: var(--white);
    text-align: center;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 40, 85, 0.95) 0%, rgba(45, 134, 89, 0.85) 100%);
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.cta-content h2 {
    color: var(--white);
    margin-bottom: 18px;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.15rem;
    margin-bottom: 32px;
}

/* ============================================
   Contacto
   ============================================ */
.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
}

.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contacto-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 24px;
    background: var(--bg-light);
    border-radius: var(--radius);
    border-left: 4px solid var(--green);
    transition: var(--transition);
}

.contacto-item:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--accent);
}

.contacto-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contacto-item h4 {
    color: var(--primary);
    margin-bottom: 4px;
    font-size: 1rem;
}

.contacto-item a, .contacto-item p {
    color: var(--text-medium);
    font-size: 0.95rem;
    margin: 0;
}

.contacto-item a:hover { color: var(--green); }

.contacto-form {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--bg-gray);
}

.contacto-form h3 {
    color: var(--primary);
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--bg-gray);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: var(--transition);
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(45, 134, 89, 0.1);
}

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

.form-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 0.9rem;
    display: none;
}

.form-message.success {
    display: block;
    background: rgba(45, 134, 89, 0.1);
    color: var(--green-dark);
    border: 1px solid var(--green);
}

.form-message.error {
    display: block;
    background: rgba(220, 38, 38, 0.1);
    color: #b91c1c;
    border: 1px solid #ef4444;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.85);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--green) 0%, var(--accent) 50%, var(--green) 100%);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.2fr 1.5fr;
    gap: 40px;
    padding-bottom: 60px;
}

.footer-brand .footer-logo {
    height: 70px;
    width: auto;
    background: white;
    padding: 10px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.footer-brand h3 {
    color: var(--white);
    margin-bottom: 12px;
    font-size: 1.3rem;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    padding-bottom: 12px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--green), var(--accent));
    border-radius: 3px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
}

.footer-col a:hover {
    color: var(--green-light);
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.92rem;
}

.footer-contact svg {
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--green-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 0;
}

/* ============================================
   WhatsApp Floating Button
   ============================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--whatsapp) 0%, var(--whatsapp-dark) 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5);
    z-index: 999;
    transition: var(--transition);
    animation: pulseRing 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(-8deg);
    box-shadow: 0 12px 36px rgba(37, 211, 102, 0.6);
}

.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background: var(--white);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: var(--transition);
    pointer-events: none;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--white);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@keyframes pulseRing {
    0% { box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5), 0 0 0 0 rgba(37, 211, 102, 0.5); }
    70% { box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5), 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 8px 28px rgba(37, 211, 102, 0.5), 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============================================
   Back to Top
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: 105px;
    right: 35px;
    width: 44px;
    height: 44px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* ============================================
   Animations on scroll
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
    .nosotros-grid { grid-template-columns: 1fr; gap: 40px; }
    .nosotros-image img { height: 420px; }
    .contacto-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
    .section { padding: 80px 0; }

    /* Tablet: 2 por fila + la última centrada sola */
    .valores-grid { max-width: 720px; }
    .valores-grid .valor-card {
        flex: 0 0 calc((100% - 24px) / 2);
        max-width: calc((100% - 24px) / 2);
    }
}

@media (max-width: 768px) {
    .top-bar-info { gap: 14px; font-size: 0.8rem; }
    .top-bar-social { display: none; }

    .menu-toggle { display: flex; }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        padding: 100px 30px 30px;
        transition: right 0.4s ease;
        z-index: 999;
    }

    .nav.open { right: 0; }

    .nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .nav a {
        padding: 14px 16px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .nav-cta { margin-top: 16px; text-align: center; }

    .hero { min-height: 80vh; text-align: left; padding: 60px 0; }
    .hero-buttons .btn { padding: 12px 24px; font-size: 0.85rem; }
    .hero-scroll { display: none; }

    .stats { padding: 40px 0; }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.15); padding-bottom: 24px; }
    .stat-item:last-child { border-bottom: none; padding-bottom: 0; }
    .stat-number { font-size: 2.8rem; }

    .section { padding: 60px 0; }
    .section-header { margin-bottom: 40px; }

    .mision-vision { grid-template-columns: 1fr; }

    .servicios-grid { grid-template-columns: 1fr; gap: 24px; }
    .tramites-grid { grid-template-columns: 1fr; gap: 24px; }
    .valores-grid { gap: 20px; max-width: 480px; }
    .valores-grid .valor-card {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .form-row { grid-template-columns: 1fr; }
    .contacto-form { padding: 28px; }

    .footer { padding-top: 60px; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-bottom: 40px; }
    .footer-bottom .container { flex-direction: column; text-align: center; }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 56px;
        height: 56px;
    }

    .whatsapp-float svg { width: 28px; height: 28px; }
    .whatsapp-tooltip { display: none; }

    .back-to-top {
        bottom: 90px;
        right: 25px;
        width: 40px;
        height: 40px;
    }

    .cta-banner { padding: 60px 0; background-attachment: scroll; }
    .cta-content h2 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
    .container { padding: 0 18px; }
    .hero h1 { font-size: 1.8rem; }
    .hero p { font-size: 0.95rem; }
    .hero-buttons { flex-direction: column; width: 100%; }
    .hero-buttons .btn { width: 100%; }

    .logo { height: 50px; }
    .logo-name { font-size: 1.1rem; }
    .logo-sub { font-size: 0.65rem; letter-spacing: 2px; }

    .nosotros-badge {
        bottom: 20px;
        left: 20px;
        padding: 14px 20px;
    }
    .nosotros-badge strong { font-size: 1.1rem; }

    .contacto-form { padding: 22px; }
    .top-bar-info span:nth-child(1) { display: none; }
}
