/* ============================================
   LOS ARMANDO CEREALES - Styles
   Unique design: double navbar, zig-zag services,
   elevated card about, horizontal stats bar
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary: #1b4332;
    --secondary: #2d6a4f;
    --light-green: #52b788;
    --accent: #d4a24e;
    --accent-hover: #e0b55e;
    --bg-light: #f0f5f1;
    --bg-white: #ffffff;
    --text-dark: #1a1a2e;
    --text-gray: #5a6a5e;
    --radius-card: 16px;
    --radius-pill: 50px;
    --shadow-soft: 0 4px 24px rgba(27, 67, 50, 0.08);
    --shadow-elevated: 0 12px 48px rgba(27, 67, 50, 0.12);
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

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

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

ul {
    list-style: none;
}

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
}

h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

h3 {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
}

.section-title {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary);
}

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

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 14px 40px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    font-family: var(--font-main);
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--accent);
    color: var(--primary);
}

.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(212, 162, 78, 0.35);
}

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

.btn-outline:hover {
    background: var(--bg-white);
    color: var(--primary);
}

/* ============================================
   1. DOUBLE NAVBAR
   ============================================ */

/* --- Top Bar --- */
.top-bar {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    padding: 8px 0;
    transition: transform 0.4s ease;
    position: relative;
    z-index: 1001;
}

.top-bar.hidden {
    transform: translateY(-100%);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
}

.top-bar .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 2rem;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.85);
    display: flex;
    align-items: center;
    gap: 6px;
}

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

.top-bar svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* --- Main Navbar --- */
.navbar {
    background: var(--bg-white);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
    transition: box-shadow var(--transition);
}

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

.navbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary);
}

.navbar-logo img {
    width: 38px;
    height: 38px;
}

.navbar-logo span {
    letter-spacing: 0.04em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-gray);
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--light-green);
    border-radius: 2px;
    transition: width var(--transition);
}

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

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.nav-cta {
    margin-left: 0.5rem;
}

.nav-cta .btn {
    padding: 10px 28px;
    font-size: 0.88rem;
}

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

.hamburger span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--primary);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ============================================
   2. HERO
   ============================================ */
.hero {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--bg-white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 800"><rect fill="%231b4332" width="1440" height="800"/><circle cx="200" cy="600" r="300" fill="%232d6a4f" opacity="0.3"/><circle cx="1200" cy="200" r="400" fill="%232d6a4f" opacity="0.2"/></svg>')
        center/cover no-repeat;
    background-color: var(--primary);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(27, 67, 50, 0.25) 0%,
        rgba(27, 67, 50, 0.6) 50%,
        rgba(27, 67, 50, 0.9) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 750px;
    padding: 2rem 1.5rem;
}

.hero-content h1 {
    margin-bottom: 1.2rem;
    font-weight: 800;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.hero-content p {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    opacity: 0.92;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content .btn {
    font-size: 1.08rem;
    padding: 16px 48px;
}

/* ============================================
   3. QUIENES SOMOS (Elevated Card)
   ============================================ */
.about {
    padding: 6rem 0;
    background: var(--bg-light);
}

.about-card {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-elevated);
    padding: 3.5rem 3rem;
    text-align: center;
    border: 1px solid rgba(82, 183, 136, 0.12);
}

.about-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.8rem;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-icon svg {
    width: 36px;
    height: 36px;
    color: var(--light-green);
}

.about-card h2 {
    color: var(--primary);
    margin-bottom: 1.2rem;
}

.about-card p {
    color: var(--text-gray);
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 2rem;
}

.about-quote {
    position: relative;
    padding: 1.5rem 2rem;
    margin-top: 1.5rem;
    border-left: 4px solid var(--light-green);
    background: var(--bg-light);
    border-radius: 0 var(--radius-card) var(--radius-card) 0;
    text-align: left;
}

.about-quote p {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0;
    font-weight: 500;
}

/* ============================================
   4. CIFRAS (Horizontal Stats Bar)
   ============================================ */
.stats {
    position: relative;
    padding: 5rem 0;
    color: var(--bg-white);
    overflow: hidden;
}

.stats-bg {
    position: absolute;
    inset: 0;
    background:
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 400"><rect fill="%231b4332" width="1440" height="400"/><rect x="0" y="180" width="1440" height="2" fill="%232d6a4f" opacity="0.3"/><rect x="0" y="220" width="1440" height="1" fill="%232d6a4f" opacity="0.2"/></svg>')
        center/cover no-repeat;
    background-color: var(--primary);
    background-attachment: fixed;
}

.stats-overlay {
    position: absolute;
    inset: 0;
    background: rgba(27, 67, 50, 0.85);
}

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

.stats-title {
    text-align: center;
    margin-bottom: 3rem;
    color: var(--bg-white);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.stats-row {
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 150px;
    position: relative;
}

.stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 15%;
    height: 70%;
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.stat-number {
    font-size: clamp(2rem, 4vw, 3.2rem);
    font-weight: 800;
    color: var(--accent);
    display: block;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.95rem;
    margin-top: 0.5rem;
    opacity: 0.85;
    font-weight: 400;
}

/* ============================================
   5. QUE HACEMOS (Zig-Zag)
   ============================================ */
.services {
    padding: 6rem 0;
    background: var(--bg-white);
}

.service-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 4rem;
    padding: 2.5rem;
    border-radius: var(--radius-card);
    transition: box-shadow var(--transition);
}

.service-row:hover {
    box-shadow: var(--shadow-soft);
}

.service-row:last-child {
    margin-bottom: 0;
}

.service-row.reverse {
    flex-direction: row-reverse;
}

.service-icon-wrap {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
    background: var(--bg-light);
    border-radius: var(--radius-card);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(82, 183, 136, 0.15);
}

.service-icon-wrap svg {
    width: 60px;
    height: 60px;
    color: var(--secondary);
}

.service-text h3 {
    color: var(--primary);
    margin-bottom: 0.8rem;
    font-size: 1.35rem;
}

.service-text p {
    color: var(--text-gray);
    font-size: 1rem;
    line-height: 1.8;
}

.service-text .service-tag {
    display: inline-block;
    margin-top: 1rem;
    padding: 6px 18px;
    background: var(--bg-light);
    color: var(--secondary);
    border-radius: var(--radius-pill);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ============================================
   6. COMPROMISO (4 Pillar Cards)
   ============================================ */
.commitment {
    padding: 6rem 0;
    background: var(--bg-light);
}

.commitment-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.commitment-card {
    background: var(--bg-white);
    border-radius: var(--radius-card);
    padding: 2.5rem 1.8rem;
    text-align: center;
    box-shadow: var(--shadow-soft);
    border-bottom: 4px solid transparent;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.commitment-card:nth-child(1) {
    border-bottom-color: var(--primary);
}

.commitment-card:nth-child(2) {
    border-bottom-color: var(--secondary);
}

.commitment-card:nth-child(3) {
    border-bottom-color: var(--light-green);
}

.commitment-card:nth-child(4) {
    border-bottom-color: var(--accent);
}

.commitment-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-elevated);
}

.commitment-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.commitment-card:hover .commitment-icon {
    background: rgba(82, 183, 136, 0.12);
}

.commitment-icon svg {
    width: 36px;
    height: 36px;
    color: var(--secondary);
}

.commitment-card h3 {
    color: var(--primary);
    margin-bottom: 0.7rem;
    font-size: 1.2rem;
}

.commitment-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ============================================
   7. CONTACTO
   ============================================ */
.contact {
    padding: 6rem 0;
    background: var(--secondary);
    position: relative;
}

.contact .section-title {
    color: var(--bg-white);
}

.contact .section-subtitle {
    color: rgba(255, 255, 255, 0.75);
}

.contact-form-wrap {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-white);
    border-radius: var(--radius-card);
    padding: 3rem;
    box-shadow: var(--shadow-elevated);
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid rgba(82, 183, 136, 0.2);
    border-radius: 12px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--light-green);
    box-shadow: 0 0 0 4px rgba(82, 183, 136, 0.1);
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-gray);
    opacity: 0.6;
}

.contact-form-wrap .btn {
    width: 100%;
    padding: 16px;
    font-size: 1.05rem;
}

.form-success {
    display: none;
    text-align: center;
    padding: 2rem;
}

.form-success svg {
    width: 56px;
    height: 56px;
    color: var(--light-green);
    margin-bottom: 1rem;
}

.form-success h3 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.form-success p {
    color: var(--text-gray);
}

/* ============================================
   8. FOOTER
   ============================================ */
.footer {
    background: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1.2fr;
    gap: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand img {
    width: 42px;
    height: 42px;
    margin-bottom: 1rem;
}

.footer-brand h3 {
    color: var(--bg-white);
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}

.footer-brand p {
    font-size: 0.92rem;
    line-height: 1.7;
}

.footer h4 {
    color: var(--bg-white);
    font-size: 1rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
}

.footer-links a {
    display: block;
    padding: 4px 0;
    font-size: 0.9rem;
    transition: color var(--transition), padding-left var(--transition);
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 6px;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

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

.footer-bottom {
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.82rem;
    opacity: 0.6;
}

/* ============================================
   ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* Tablet */
@media (max-width: 992px) {
    .commitment-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .service-row {
        gap: 2.5rem;
        padding: 2rem;
    }

    .service-icon-wrap {
        width: 110px;
        height: 110px;
    }

    .stats-row {
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* Navbar */
    .top-bar .container {
        justify-content: center;
        gap: 1.2rem;
        flex-wrap: wrap;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-white);
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        gap: 0;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.1);
        transition: right 0.4s ease;
        z-index: 1001;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links a {
        padding: 0.8rem 0;
        font-size: 1.05rem;
        width: 100%;
        border-bottom: 1px solid var(--bg-light);
    }

    .nav-cta {
        margin-left: 0;
        margin-top: 1rem;
    }

    .hamburger {
        display: flex;
    }

    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 999;
    }

    .mobile-overlay.active {
        display: block;
    }

    /* Hero */
    .hero {
        min-height: 80vh;
    }

    .hero-content {
        padding: 1.5rem;
    }

    /* Services zig-zag: stack on mobile */
    .service-row,
    .service-row.reverse {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .service-icon-wrap {
        width: 100px;
        height: 100px;
    }

    .service-icon-wrap svg {
        width: 44px;
        height: 44px;
    }

    /* Commitment */
    .commitment-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Stats */
    .stats-row {
        flex-direction: column;
        gap: 2.5rem;
    }

    .stat-item:not(:last-child)::after {
        display: none;
    }

    .stat-item:not(:last-child) {
        padding-bottom: 2.5rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Contact form */
    .contact-form-wrap {
        padding: 2rem 1.5rem;
    }

    /* About */
    .about-card {
        padding: 2.5rem 1.5rem;
    }

    .about-quote {
        padding: 1.2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 75vh;
    }

    h1 {
        font-size: 1.9rem;
    }

    .btn {
        padding: 12px 32px;
        font-size: 0.95rem;
    }

    .stat-number {
        font-size: 2.2rem;
    }
}
