/* ==========================================
   STYLE.CSS - CASABRILLAS
   Base limpia, profesional y responsive
   ========================================== */

/* VARIABLES */
:root {
    --primary: #1e40af;
    --primary-light: #3b82f6;
    --secondary: #d97706;
    --dark: #1e293b;
    --gray-600: #475569;
    --gray-400: #94a3b8;
    --gray-200: #f1f5f9;
    --gray-100: #f8fafc;
    --white: #ffffff;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 20px 30px -12px rgba(0, 0, 0, 0.15);
    --radius: 1rem;
    --radius-lg: 1.5rem;
    --font-sans: 'Montserrat', sans-serif;
    --font-typewriter: 'Special Elite', 'Courier New', monospace;
}

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

html {
    scroll-behavior: smooth;
    font-size: 18px;
}

body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    background-image: 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='%233b82f6' fill-opacity='0.03'%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");
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* SKIP LINK (accesibilidad) */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary);
    color: white;
    padding: 8px;
    z-index: 1001;
    text-decoration: none;
}
.skip-link:focus { top: 0; }

/* NAVBAR */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
    padding: 0.8rem 0;
}

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

.logo-area .logo {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-typewriter);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-decoration: none;
}

.slogan {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-600);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    color: var(--primary);
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    font-weight: 600;
    color: var(--dark);
    transition: color 0.25s;
    font-size: 0.9rem;
}

.nav-menu a:hover { color: var(--primary); }

.lang-selector {
    display: flex;
    gap: 0.5rem;
}

.lang-btn {
    background: transparent;
    border: 1px solid var(--gray-400);
    border-radius: 0.5rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-600);
}

.lang-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* HERO */
.hero {
    background: linear-gradient(125deg, #0f172a 0%, #1e293b 100%);
    color: white;
    text-align: center;
    padding: 5rem 0;
    position: relative;
}

.hero h1 {
    font-size: 3.2rem;
    font-family: var(--font-typewriter);
    background: linear-gradient(135deg, #fff, #cbd5e1);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--gray-200);
}

.hero strong { color: var(--primary-light); }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(59,130,246,0.4);
}

.btn-secondary {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-3px);
}

/* MARCAS */
.marcas {
    padding: 2rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.marcas-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.marca-item {
    background: var(--gray-100);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-600);
    transition: all 0.2s;
}

.marca-item:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* SECCIONES GENERALES */
section { padding: 4rem 0; }
.section-light { background: var(--white); }
.section-gray { background: var(--gray-100); }

.section-title {
    font-size: 2.2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.8rem;
}

.section-subtitle {
    text-align: center;
    color: var(--gray-600);
    max-width: 650px;
    margin: 0 auto 3rem;
}

/* TARJETAS DE SERVICIOS */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border: 1px solid rgba(255,255,255,0.3);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary);
}

.service-icon {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.service-card h3 { font-size: 1.5rem; margin-bottom: 0.8rem; }
.service-card p { color: var(--gray-600); margin-bottom: 1.5rem; }

.btn-small {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    transition: background 0.2s;
}
.btn-small:hover { background: var(--primary-light); }

/* GENERACIONES */
.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.generation-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.8rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.generation-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
}

.gen-icon {
    font-size: 2.2rem;
    color: var(--primary);
    background: var(--gray-100);
    width: 70px;
    height: 70px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.generation-card h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.period { color: var(--primary); font-weight: 600; margin-bottom: 0.8rem; font-size: 0.8rem; }

/* VALORES */
.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.value-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}
.value-icon { font-size: 2rem; color: var(--primary); margin-bottom: 0.8rem; }

/* CONTACTO */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-form, .contact-info {
    background: rgba(255, 255, 255, 0.9);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.3rem; font-size: 0.85rem; }
.required { color: #ef4444; }

input, textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.8rem;
    font-size: 0.9rem;
    font-family: var(--font-sans);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    padding: 0.9rem;
    border-radius: 2rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    transition: all 0.25s;
}
.btn-submit:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.alert {
    padding: 0.8rem;
    border-radius: 0.8rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
}
.alert-success { background: #d1fae5; color: #065f46; border-left: 4px solid #10b981; }
.alert-error { background: #fee2e2; color: #991b1b; border-left: 4px solid #ef4444; }

.contact-detail {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
}
.contact-icon {
    width: 42px;
    height: 42px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
}

.map { margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; }
.map iframe { width: 100%; height: 200px; border: 0; }

/* FAQ */
.faq-grid { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}
.faq-question {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 700;
}
.faq-question i { color: var(--primary); transition: transform 0.25s; }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s;
    padding: 0 1.5rem;
    color: var(--gray-600);
}
.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 1rem 1.5rem;
}
.faq-item.active .faq-question i { transform: rotate(180deg); }

/* CTA FINAL */
.cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    text-align: center;
    padding: 3rem 0;
}
.cta h2 { font-size: 2rem; margin-bottom: 0.5rem; }
.cta .btn-white {
    background: white;
    color: var(--primary);
    border: none;
}
.cta .btn-outline-white {
    background: transparent;
    color: white;
    border: 1px solid white;
}
.cta .btn-white:hover, .cta .btn-outline-white:hover { transform: translateY(-3px); }

/* FOOTER */
.footer {
    background: var(--dark);
    color: var(--gray-400);
    padding: 2rem 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.footer h3 { color: white; margin-bottom: 1rem; font-size: 1.1rem; }
.footer a { color: var(--primary-light); text-decoration: none; }
.copyright { text-align: center; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.75rem; }

/* WHATSAPP FLOTANTE */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #25D366;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    transition: transform 0.25s;
    z-index: 100;
}
.whatsapp-float:hover { transform: scale(1.08); }

/* RESPONSIVE */
@media (max-width: 992px) {
    .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    html { font-size: 16px; }
    .container { padding: 0 1rem; }
    .menu-toggle { display: block; }
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1rem;
        margin-top: 1rem;
        padding: 1rem 0;
    }
    .nav-menu.active { display: flex; }
    .hero h1 { font-size: 2rem; }
    .section-title { font-size: 1.8rem; }
    .btn { width: 100%; justify-content: center; }
}