/*
Theme Name: Inovar Nobre
Description: Tema a medida para Inovar Nobre, empresa de reformas en Badajoz. Migrado desde el sitio estático original conservando el diseño.
Author: Badabyte
Version: 1.0.0
Text Domain: inovar-nobre
*/

/* ==========================================================================
   VARIABLES GLOBALES
   ========================================================================== */
   :root {
    /* Colores corporativos */
    --color-primary: #FF6B00; /* Naranja corporativo */
    --color-primary-hover: #E56000;
    --color-secondary: #111111; /* Negro fondo */
    --color-white: #FFFFFF;
    --color-gray: #F5F5F5; /* Gris claro para fondos */
    --color-text: #333333; /* Texto cuerpo */
    --color-muted: #777777; /* Texto secundario */

    /* Tipografía */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Sombras y Radios */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.12);
    --border-radius: 8px;
    --border-radius-lg: 16px;

    /* Transiciones */
    --transition: all 0.3s ease;
}

/* ==========================================================================
   RESETEO BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.7;
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    line-height: 1.2;
    font-weight: 700;
}

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

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

/* ==========================================================================
   UTILIDADES
   ========================================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--color-gray);
}

.bg-dark {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.bg-dark h1, .bg-dark h2, .bg-dark h3 {
    color: var(--color-white);
}

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

.text-white {
    color: var(--color-white) !important;
}

.mt-4 {
    margin-top: 2rem;
}

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

.section-header h2 {
    font-size: clamp(26px, 4vw, 38px);
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--color-muted);
    max-width: 700px;
    margin: 0 auto;
}

.bg-dark .section-subtitle {
    color: rgba(255,255,255,0.7);
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    min-height: 48px; /* Accesibilidad móvil */
}

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

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,107,0,0.3);
}

.btn-primary-small {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 10px 20px;
    font-size: 14px;
    border-radius: 4px;
    min-height: 44px;
}

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

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

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

.btn-block {
    width: 100%;
}

.btn-whatsapp-large {
    background-color: #25D366;
    color: white;
    border: none;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}

.btn-whatsapp-large:hover {
    background-color: #20BA5A;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37,211,102,0.4);
    color: white;
}

/* ==========================================================================
   HEADER & NAVEGACIÓN
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 16px 0;
    transition: var(--transition);
}

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

.logo-text {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 600;
    color: var(--color-secondary);
}

.logo-text strong {
    color: var(--color-primary);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    color: var(--color-secondary);
}

.nav-links a:hover:not(.btn) {
    color: var(--color-primary);
}

/* Menú Móvil */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: var(--color-secondary);
    border-radius: 3px;
    transition: var(--transition);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--color-secondary);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
}

.mobile-menu-overlay.active {
    right: 0;
}

.mobile-menu-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 40px;
    color: var(--color-white);
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
}

.mobile-nav-links li {
    margin: 24px 0;
}

.mobile-nav-links a {
    font-family: var(--font-heading);
    font-size: 24px;
    color: var(--color-white);
    font-weight: 700;
}

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

@media (max-width: 992px) {
    .nav-links {
        display: none;
    }
    .menu-toggle {
        display: flex;
    }
}

/* ==========================================================================
   1. HERO
   ========================================================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background-image: url('assets/images/hero.png');
    background-size: cover;
    background-position: center;
    color: var(--color-white);
    padding-top: 80px; /* offset header */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(17,17,17,0.9) 0%, rgba(17,17,17,0.5) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0; /* Left aligned in container */
}

.hero-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.2);
}

.hero-title {
    font-size: clamp(34px, 5vw, 56px);
    margin-bottom: 24px;
    color: var(--color-white);
}

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

.hero-description {
    font-size: 1.125rem;
    font-weight: 400;
    margin-bottom: 40px;
    max-width: 600px;
    opacity: 0.9;
}

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

.hero-services-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 16px 0;
    z-index: 2;
}

.bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.bar-content span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.bar-content svg {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .hero-content {
        text-align: center;
        margin: 0 auto;
    }
    .hero-ctas {
        justify-content: center;
    }
    .bar-content {
        justify-content: center;
    }
}

/* ==========================================================================
   2. SERVICIOS
   ========================================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--color-white);
    padding: 40px 32px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
    height: 100%;
}

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

.service-card.highlighted {
    border-top: 4px solid var(--color-primary);
}

.service-badge {
    position: absolute;
    top: -12px;
    left: 32px;
    background-color: var(--color-primary);
    color: var(--color-white);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    box-shadow: 0 4px 8px rgba(255,107,0,0.2);
}

.service-icon {
    color: var(--color-primary);
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.service-card p {
    color: var(--color-muted);
    font-size: 15px;
    line-height: 1.6;
}

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   3. POR QUÉ ELEGIRNOS
   ========================================================================== */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

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

.why-icon {
    font-size: 48px;
    margin-bottom: 24px;
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    background-color: var(--color-white);
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.why-card h3 {
    font-size: 20px;
    margin-bottom: 16px;
}

.why-card p {
    color: var(--color-muted);
    font-size: 15px;
}

@media (max-width: 992px) {
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .why-us-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   4. ESTADÍSTICAS
   ========================================================================== */
.stats {
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 56px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-text {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.8);
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 48px;
    }
}

/* ==========================================================================
   5. GALERÍA
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-caption {
    position: absolute;
    bottom: -100px; /* Oculto por defecto */
    left: 0;
    width: 100%;
    padding: 24px;
    background: linear-gradient(to top, rgba(17,17,17,0.9), transparent);
    color: var(--color-white);
    transition: bottom 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item:hover .gallery-caption {
    bottom: 0;
}

.gallery-caption h4 {
    color: var(--color-white);
    font-size: 18px;
    margin-bottom: 4px;
}

.gallery-caption p {
    font-size: 14px;
    opacity: 0.8;
}

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

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .gallery-caption {
        bottom: 0; /* Siempre visible en móvil */
    }
}

/* ==========================================================================
   6. A QUIÉN SERVIMOS
   ========================================================================== */
.serve-flex {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
}

.serve-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 180px;
}

.serve-icon {
    font-size: 40px;
    background: var(--color-white);
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.serve-item:hover .serve-icon {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.serve-item span {
    font-weight: 600;
    font-size: 16px;
    font-family: var(--font-heading);
}

/* ==========================================================================
   7. TESTIMONIOS
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.testimonial-card {
    background: var(--color-white);
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.03);
}

.stars {
    margin-bottom: 16px;
    font-size: 18px;
}

.testimonial-text {
    font-style: italic;
    color: var(--color-text);
    margin-bottom: 32px;
    font-size: 16px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--color-primary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-heading);
}

.author-info strong {
    display: block;
    font-family: var(--font-heading);
    color: var(--color-secondary);
}

.author-info span {
    font-size: 13px;
    color: var(--color-muted);
}

@media (max-width: 992px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   8. FORMULARIO Y CTA
   ========================================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-info h2 {
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 16px;
}

.contact-subtitle {
    font-size: 20px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 48px;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 32px;
}

.contact-method .icon {
    font-size: 32px;
    background: rgba(255,255,255,0.1);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.contact-method .details span {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin-bottom: 4px;
}

.contact-method .details strong {
    font-size: 24px;
    font-family: var(--font-heading);
}

.contact-form-wrapper {
    background: var(--color-white);
    padding: 48px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    color: var(--color-text);
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-family: var(--font-heading);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 16px;
    transition: border-color 0.3s;
    background-color: #fafafa;
}

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

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkbox-group input {
    margin-top: 5px;
}

.checkbox-group label {
    font-weight: 400;
    font-size: 14px;
    color: var(--color-muted);
}

.checkbox-group a {
    color: var(--color-primary);
    text-decoration: underline;
}

.form-legal {
    font-size: 12px;
    color: var(--color-muted);
    text-align: center;
    margin-top: 16px;
}

@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    .contact-form-wrapper {
        padding: 32px 24px;
    }
}

/* ==========================================================================
   9. FOOTER
   ========================================================================== */
.site-footer {
    background-color: #0a0a0a;
    color: #a0a0a0;
    padding-top: 80px;
}

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

.footer-brand .logo {
    margin-bottom: 24px;
}

.footer-brand p {
    max-width: 300px;
    margin-bottom: 24px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: var(--color-white);
    font-weight: 600;
}

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

.site-footer h3 {
    color: var(--color-white);
    font-size: 18px;
    margin-bottom: 24px;
}

.footer-contact p {
    margin-bottom: 12px;
}

.footer-contact a {
    color: #a0a0a0;
}

.footer-contact a:hover {
    color: var(--color-primary);
}

.footer-legal ul {
    list-style: none;
}

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

.footer-legal a:hover {
    color: var(--color-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 24px 0;
    font-size: 14px;
}

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

.credits {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .footer-bottom .container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* ==========================================================================
   WHATSAPP FLOTANTE
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    background: #25D366;
    color: white;
    border-radius: 50px;
    padding: 12px 20px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 8px 24px rgba(37,211,102,0.4);
    color: white;
}

@media (max-width: 480px) {
    .whatsapp-float span {
        display: none; /* Solo icono en móviles pequeños */
    }
    .whatsapp-float {
        padding: 14px;
        bottom: 16px;
        right: 16px;
    }
}

/* ==========================================================================
   PÁGINAS LEGALES (migrado desde los <style> inline de aviso-legal.html,
   politica-privacidad.html y politica-cookies.html)
   ========================================================================== */
.legal-page {
    padding: 60px 0 80px;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--color-secondary);
}

.legal-content h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--color-secondary);
}

.legal-content p,
.legal-content li {
    margin-bottom: 1rem;
    color: var(--color-text);
    line-height: 1.6;
}

.legal-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

/* Cabecera simple de las páginas legales (antes sin estilos: fondo/sombra/
   logo con tipografía de marca, igual que la cabecera principal pero sin menú) */
.header {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 16px 0;
}

/* .btn-outline nació para fondos oscuros (borde/texto blanco). Sobre la
   cabecera clara de las páginas legales necesita el contraste invertido. */
.header .btn-outline {
    color: var(--color-secondary);
    border-color: var(--color-secondary);
}

.header .btn-outline:hover {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

/* ==========================================================================
   COMPATIBILIDAD ADMIN BAR DE WORDPRESS
   ========================================================================== */
body.admin-bar .site-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: 46px;
    }
}

/* ==========================================================================
   AVISO DE ENVÍO DEL FORMULARIO DE PRESUPUESTO
   ========================================================================== */
.form-alert {
    padding: 16px 20px;
    border-radius: 4px;
    margin-bottom: 24px;
    font-weight: 600;
    font-size: 15px;
}

.form-alert-success {
    background-color: rgba(37,211,102,0.12);
    color: #1a7a3e;
    border: 1px solid rgba(37,211,102,0.3);
}

.form-alert-error {
    background-color: rgba(255,107,0,0.1);
    color: #b34700;
    border: 1px solid rgba(255,107,0,0.3);
}
