@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #0284c7;      /* Azul celeste oscuro (combina con el logo) */
    --primary-light: #0ea5e9; /* Azul celeste brillante */
    --accent: #EAB308;
    --secondary: #14B8A6;
    --text-main: #0F172A;
    --text-light: #64748B;
    --bg-white: #ffffff;
    --bg-light: #F1F5F9;
    --bg-dark: #0F172A;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.01);
    --shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --container-width: 1200px;
    --border-radius-lg: 24px;
    --border-radius-md: 16px;
    --border-radius-full: 9999px;
}

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

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

h1, h2, h3, h4, .font-heading {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

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

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 45px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background: transparent;
}

.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 12px 28px;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.39);
}

.nav-cta:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.23);
}

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

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: white;
    background: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.75)), url('../images/hero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Fallback for no JS */
    overflow: hidden;
}

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

.hero-content {
    max-width: 700px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease-out;
    text-shadow: 0 4px 20px rgba(0,0,0,0.5);
    font-weight: 800;
    color: #ffffff !important;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
}

.hero-btns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero .btn-primary {
    font-size: 1.1rem;
    padding: 18px 42px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(234, 179, 8, 0); }
    100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0); }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: var(--border-radius-full);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--accent);
    color: var(--text-main);
    box-shadow: 0 4px 14px 0 rgba(234, 179, 8, 0.39);
}

.btn-primary:hover {
    background: #FACC15;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(234, 179, 8, 0.4);
}

/* Section Common */
section {
    padding: 100px 0;
}

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

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

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(79, 70, 229, 0.1);
    border-radius: var(--border-radius-md);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary);
    color: white;
    transform: rotateY(10deg);
}

.service-card h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    font-weight: 700;
}

/* Feature Blocks (Qué podemos hacer por su empresa) */
.feature-block {
    text-align: center;
    padding: 40px 30px;
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.feature-block:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-bottom: 4px solid var(--primary);
}

.feature-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
    box-shadow: 0 10px 20px rgba(2, 132, 199, 0.2);
    border: 3px solid white;
}

/* Values List (Credibilidad) */
.values-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.value-item:hover {
    transform: translateX(10px);
    border-left: 4px solid var(--accent);
}

.value-icon {
    color: var(--secondary);
    font-size: 1.5rem;
    background: rgba(20, 184, 166, 0.1);
    padding: 10px;
    border-radius: 50%;
}

/* Sectores Grid */
.sector-card {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3;
    display: flex;
    align-items: flex-end;
    padding: 30px;
    background-size: cover;
    background-position: center;
}

.sector-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.2) 100%);
    z-index: 1;
}

.sector-content {
    position: relative;
    z-index: 2;
    color: white;
}

.sector-content h3 {
    color: white;
    margin-bottom: 10px;
}

/* Disclaimer Note */
.disclaimer-note {
    background: #fff8e1;
    border-left: 5px solid #ffa000;
    padding: 20px;
    margin-top: 40px;
    display: flex;
    align-items: center;
    gap: 15px;
    border-radius: 4px;
}

/* Chatbot Floating Button */
.chatbot-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 26px;
    box-shadow: 0 10px 25px rgba(79, 70, 229, 0.4);
    z-index: 1000;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.chatbot-float:hover {
    transform: scale(1.08) translateY(-5px);
    box-shadow: 0 15px 30px rgba(79, 70, 229, 0.5);
}

/* Chat Window */
.chat-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 360px;
    height: 520px;
    background: var(--bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    z-index: 1001;
    overflow: hidden;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border: 1px solid rgba(0,0,0,0.05);
}

.chat-window.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    margin: 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.chat-close {
    cursor: pointer;
    opacity: 0.8;
}

.chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: #f0f2f5;
}

.chat-message {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.message-bot {
    align-self: flex-start;
    background: white;
    color: var(--text-main);
    border-bottom-left-radius: 2px;
}

.message-user {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-footer {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.chat-footer input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px;
    border-radius: 20px;
    outline: none;
}

.chat-footer button {
    background: var(--primary);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
}

.chat-wa-link {
    display: inline-block;
    margin-top: 10px;
    background: #25d366;
    color: white !important;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: white;
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
    margin-bottom: 50px;
}

.footer-col h4 {
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    opacity: 0.7;
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-cta {
        display: none !important;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 15px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        display: none;
        border-top: 1px solid rgba(0,0,0,0.05);
    }
    
    .nav-links.nav-active {
        display: flex;
        animation: fadeInUp 0.3s ease forwards;
    }
    
    .nav-links li {
        text-align: center;
        width: 100%;
    }
    
    .nav-links a {
        display: block;
        padding: 10px;
        font-size: 1.1rem;
    }
    
    .hero-btns {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-btns .btn {
        width: 100%;
        text-align: center;
        margin-left: 0 !important;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.2, 0, 0, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

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