/* ── Variables y Base ────────────────────────────────────── */
:root {
    --bg-body: #fff8f3;
    --bg-card: #ffffff;
    --primary: #f97316;
    --primary-light: #fff7ed;
    --primary-dark: #ea580c;
    --secondary: #0f172a;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent: #3b82f6;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
}

h1, h2, h3, .navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
}

span.highlight {
    color: var(--primary);
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 5px; }

/* ── Navbar ─────────────────────────────────────────────── */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 3px solid var(--primary);
    padding: 1rem 0;
    transition: box-shadow 0.3s, padding 0.3s;
    z-index: 1050;
}

.navbar-brand {
    padding: 0;
}

.navbar-logo {
    height: 45px;
    width: auto;
}

.nav-link {
    color: var(--text-main);
    font-weight: 600;
    transition: color 0.3s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary);
    transition: width 0.3s, left 0.3s;
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link:focus::after {
    width: 100%;
    left: 0;
}

.nav-link:hover,
.nav-link:focus {
    color: var(--primary);
}

/* ── Hero Section ───────────────────────────────────────── */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 30%, #fed7aa 70%, #fdba74 100%);
}

.carousel-item {
    height: 100vh;
    min-height: 300px;
    background: no-repeat center center scroll;
    background-size: cover;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background: linear-gradient(135deg, rgba(255, 247, 237, 0.92) 0%, rgba(255, 237, 213, 0.85) 50%, rgba(254, 215, 170, 0.75) 100%);
    z-index: 1;
}

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

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--secondary);
    line-height: 1.1;
}

.hero-subtitle {
    color: var(--primary);
    letter-spacing: 3px;
    background: rgba(249, 115, 22, 0.1);
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

/* ── Botones ────────────────────────────────────────────── */
.btn-glow {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 14px 38px;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
    transition: transform 0.3s, box-shadow 0.3s, background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 25px -5px rgba(249, 115, 22, 0.4);
    background: var(--primary-dark);
    color: #fff;
}

.btn-outline-dark {
    border: 2px solid var(--secondary);
}

.btn-outline-dark:hover {
    background: var(--secondary);
    color: #fff;
    border-color: var(--secondary);
}

/* ── Stats Bar ──────────────────────────────────────────── */
.stats-bar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.stats-bar::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.stats-bar::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.stats-bar h2 {
    color: #fff;
    font-size: 3.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.stats-label {
    letter-spacing: 2px;
    opacity: 0.9;
}

/* ── Divisiones Section ─────────────────────────────────── */
.divisiones-section {
    background: #ffffff;
    padding: 100px 0;
}

.section-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 8px 20px;
    border-radius: 30px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1rem;
    border: 1px solid rgba(249, 115, 22, 0.2);
}

.division-card {
    background: var(--bg-card);
    border: 2px solid rgba(249, 115, 22, 0.1);
    border-radius: 24px;
    padding: 2.5rem;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

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

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

.division-card:hover {
    transform: translateY(-12px);
    border-color: var(--primary);
    box-shadow: 0 20px 40px -10px rgba(249, 115, 22, 0.2);
}

.division-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), rgba(249, 115, 22, 0.05));
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
}

.division-card h3 {
    color: var(--secondary);
}

.division-card p {
    color: var(--text-muted);
}

/* ── Nosotros Section ───────────────────────────────────── */
.nosotros-section {
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
    padding: 100px 0;
}

.nosotros-card {
    border-radius: 20px;
    padding: 40px;
    height: 100%;
    background: #ffffff;
    border-left: 5px solid var(--primary);
    transition: transform 0.3s, background-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
}

.nosotros-card:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(249, 115, 22, 0.1);
}

.nosotros-card--secondary {
    border-left-color: var(--secondary);
}

.nosotros-card h3 {
    color: var(--secondary);
}

.value-item {
    background: linear-gradient(135deg, var(--primary-light), #ffffff);
    padding: 10px 20px;
    border-radius: 50px;
    margin-bottom: 10px;
    display: inline-block;
    margin-right: 10px;
    font-weight: 600;
    color: var(--primary-dark);
    border: 1px solid rgba(249, 115, 22, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.value-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.15);
}

/* ── AI Chat Modal ──────────────────────────────────────── */
.chat-modal .modal-content {
    border: 0;
    border-radius: 20px;
    border-top: 4px solid var(--primary);
}

.chat-container {
    height: 400px;
    overflow-y: auto;
    background: #fef7f0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid rgba(249, 115, 22, 0.1);
}

.message {
    margin-bottom: 15px;
    padding: 12px 18px;
    border-radius: 15px;
    max-width: 80%;
    font-size: 0.95rem;
    word-wrap: break-word;
}

.message.ai {
    background: #fff;
    color: var(--text-main);
    border-bottom-left-radius: 2px;
    align-self: flex-start;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 3px solid var(--primary);
}

.message.user {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-bottom-right-radius: 2px;
    margin-left: auto;
}

.loading-dots span {
    animation: blink 1.4s infinite both;
    height: 8px;
    width: 8px;
    background: var(--primary);
    display: inline-block;
    border-radius: 50%;
    margin: 0 2px;
}

@keyframes blink {
    0%   { opacity: 0.2; }
    20%  { opacity: 1; }
    100% { opacity: 0.2; }
}

/* ── Contact Section ────────────────────────────────────── */
.contact-section {
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
    padding: 120px 0;
}

.contact-card {
    border: 0;
    border-radius: 24px;
    border-top: 4px solid var(--primary);
}

.contact-info-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.form-control {
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 0.2rem rgba(249, 115, 22, 0.15);
}

.form-label {
    color: var(--secondary);
}

.form-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 4px;
    display: none;
}

.form-control.is-invalid {
    border-color: #dc2626;
}

.form-control.is-invalid ~ .form-error {
    display: block;
}

/* ── Footer ─────────────────────────────────────────────── */
footer {
    background: var(--secondary);
    color: #fff;
    padding: 80px 0 40px;
    position: relative;
    overflow: hidden;
}

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

.footer-logo {
    height: 55px;
    width: auto;
    filter: brightness(1.3);
}

/* ── WhatsApp Floating Button ───────────────────────────── */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.35);
    z-index: 1000;
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.45);
    color: white;
}

/* ── Separator / Decorative ─────────────────────────────── */
.section-divider {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    border-radius: 2px;
    margin: 0 auto 2rem;
}
