/* ==========================================================================
   Rivera Best Life — hoja de estilos única
   Paleta basada en el logotipo
   ========================================================================== */
:root {
    --bg-cream: #FAF7F0;     /* Fondo crema suave del logo */
    --navy-blue: #0A2540;    /* Azul marino corporativo */
    --navy-blue-dark: #071b30;
    --gold-sun: #C5A059;     /* Dorado del sol */
    --gold-sun-light: #d9bd85;
    --text-dark: #333333;
    --text-muted: #666666;
    --white: #FFFFFF;
    --radius: 10px;
    --shadow: 0 4px 15px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 24px rgba(10,37,64,0.12);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-cream);
    color: var(--text-dark);
    line-height: 1.6;
}

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

a {
    color: inherit;
}

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

/* ==========================================================================
   Encabezado / Navegación
   ========================================================================== */
.main-header {
    background-color: var(--white);
    border-bottom: 3px solid var(--gold-sun);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.logo-container img {
    max-width: 170px;
    width: 100%;
    height: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    text-decoration: none;
    color: var(--navy-blue);
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.main-nav a:hover {
    color: var(--gold-sun);
}

.btn-phone {
    background-color: var(--navy-blue);
    color: var(--white) !important;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.9rem !important;
}

.btn-phone:hover {
    background-color: var(--navy-blue-dark);
    color: var(--white) !important;
}

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

.nav-toggle span {
    width: 26px;
    height: 3px;
    background: var(--navy-blue);
    border-radius: 2px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    align-items: center;
    gap: 40px;
    padding-top: 50px;
    padding-bottom: 50px;
}

.eyebrow {
    color: var(--gold-sun);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.hero h1 {
    color: var(--navy-blue);
    font-size: 2.6rem;
    line-height: 1.2;
    margin-bottom: 18px;
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 28px;
    max-width: 46ch;
}

.hero-cta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 14px 26px;
    border-radius: 6px;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.2s, background 0.2s;
}

.btn-primary {
    background-color: var(--navy-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--navy-blue-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--navy-blue);
    border: 2px solid var(--navy-blue);
}

.btn-secondary:hover {
    background-color: var(--navy-blue);
    color: var(--white);
    transform: translateY(-2px);
}

.hero-image img {
    width: 100%;
    height: auto;
}

/* ==========================================================================
   Cinta decorativa de marca
   ========================================================================== */
.brand-strip {
    height: 64px;
    background-image: url('img/rbl-pattern.png');
    background-repeat: repeat-x;
    background-size: auto 100%;
    opacity: 0.35;
    border-top: 1px solid rgba(197,160,89,0.4);
    border-bottom: 1px solid rgba(197,160,89,0.4);
}

/* ==========================================================================
   Sección de Productos
   ========================================================================== */
.section-heading {
    text-align: center;
    max-width: 620px;
    margin: 0 auto 36px;
}

.section-heading h2 {
    color: var(--navy-blue);
    margin-bottom: 10px;
    font-size: 2rem;
}

.section-heading p {
    color: var(--text-muted);
}

.blog-section {
    margin-top: 50px;
    margin-bottom: 20px;
}

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

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--navy-blue);
    transition: box-shadow 0.25s, transform 0.25s;
    display: flex;
    flex-direction: column;
}

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

.card-img {
    height: 180px;
    background-color: var(--bg-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.card-img img {
    height: 140px;
    width: auto;
}

.card-content {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    color: var(--navy-blue);
    margin-bottom: 10px;
}

.card-content p {
    color: var(--text-muted);
    flex: 1;
}

.card-link {
    display: inline-block;
    margin-top: 16px;
    color: var(--gold-sun);
    font-weight: 700;
    text-decoration: none;
}

.card-link:hover {
    color: var(--navy-blue);
}

/* ==========================================================================
   Por qué elegirnos
   ========================================================================== */
.why-section {
    background-color: var(--navy-blue);
    color: var(--white);
    padding: 60px 0;
    margin-top: 60px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    padding: 0;
}

.why-item {
    text-align: center;
}

.why-icon {
    font-size: 2.2rem;
    display: inline-block;
    margin-bottom: 12px;
}

.why-item h4 {
    color: var(--gold-sun-light);
    margin-bottom: 8px;
}

.why-item p {
    color: #cfd8e3;
    font-size: 0.95rem;
}

/* ==========================================================================
   Sobre nosotros
   ========================================================================== */
.about-section {
    padding-top: 60px;
    padding-bottom: 20px;
    max-width: 800px;
}

.about-section h2 {
    color: var(--navy-blue);
    margin-bottom: 18px;
    text-align: center;
}

.about-section p {
    color: var(--text-muted);
    text-align: center;
    font-size: 1.05rem;
}

/* ==========================================================================
   Formulario de Contacto
   ========================================================================== */
.contact-section {
    padding: 60px 0;
}

.contact-section > .container {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    max-width: 640px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.contact-section h2 {
    color: var(--navy-blue);
    margin-bottom: 10px;
    text-align: center;
}

.contact-section > .container > p {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-muted);
}

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

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: var(--navy-blue);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--navy-blue);
    outline: none;
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.btn-submit {
    background-color: var(--navy-blue);
    color: var(--white);
    border: none;
    padding: 14px 20px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-submit:hover {
    background-color: var(--navy-blue-dark);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-status {
    margin-top: 14px;
    text-align: center;
    font-weight: 600;
    min-height: 1.2em;
}

.form-status.success { color: #1a7a3c; }
.form-status.error { color: #b3261e; }

/* ==========================================================================
   Pie de página
   ========================================================================== */
.main-footer {
    background-color: var(--navy-blue);
    color: var(--white);
    text-align: center;
    padding: 40px 20px;
    margin-top: 20px;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    max-width: 140px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.social-links {
    margin-top: 6px;
}

.social-links a {
    color: var(--gold-sun);
    margin: 0 10px;
    text-decoration: none;
    font-weight: bold;
}

.social-links a:hover {
    color: var(--white);
}

/* ==========================================================================
   Responsivo
   ========================================================================== */
@media (max-width: 860px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding-top: 30px;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-image {
        order: -1;
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        border-bottom: 3px solid var(--gold-sun);
    }

    .main-nav.open {
        max-height: 320px;
    }

    .main-nav a {
        width: 100%;
        padding: 16px 6%;
        border-top: 1px solid #eee;
    }

    .btn-phone {
        border-radius: 0;
        text-align: center;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
}
