/* =============================================
   RESPONSIVE FIX — Cerrajeros Fuenlabrada
   Correcciones UI/UX para versión móvil
   ============================================= */

/* ─── 1. FOOTER FIX: .site-footer hereda estilos de .main-footer ─── */
.site-footer {
    background-color: var(--bg-darker);
    border-top: 4px solid var(--primary-color);
    padding-top: 4rem;
    font-size: 0.9rem;
    color: #ffffff;
}

.site-footer p,
.site-footer a {
    color: #ffffff;
}

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

/* ─── 2. TOP-BAR RESPONSIVE ─── */
@media (max-width: 600px) {
    .top-bar {
        font-size: 0.75rem;
        padding: 0.4rem 0;
    }

    .top-bar-content {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.3rem;
    }

    .contact-info {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }

    .contact-info a {
        margin-right: 0;
        font-size: 0.75rem;
    }

    /* Ocultar email en pantallas muy pequeñas */
    .contact-info a[href^="mailto"] {
        display: none;
    }

    .top-links {
        display: none;
    }
}

/* ─── 3. GRID-2-COL MOBILE FIX ─── */
@media (max-width: 900px) {
    .grid-2-col {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .points-images {
        order: -1;
        text-align: center;
    }

    .points-images .img-main {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
        border-radius: 12px;
    }

    .img-secondary {
        position: static;
        width: 60%;
        margin: 1rem auto 0;
        border-radius: 8px;
    }

    .overlay-img {
        position: static;
        width: 80%;
        margin: 1rem auto 0;
    }

    /* Fancy list items: full width text */
    .fancy-list li {
        gap: 1rem;
    }

    .fancy-list i {
        font-size: 1.3rem;
        margin-right: 0.8rem;
        min-width: 24px;
        flex-shrink: 0;
    }

    .fancy-list li div {
        flex: 1;
    }

    /* Blog title dentro de fancy-list */
    .fancy-list .blog-title {
        font-size: 1.3rem !important;
        line-height: 1.3;
    }
}

/* ─── 4. COOKIE BANNER MOBILE FIX ─── */
@media (max-width: 768px) {
    .cookie-banner {
        bottom: 80px;
        left: 1rem;
        right: 1rem;
        max-width: calc(100% - 2rem);
        padding: 1rem;
        font-size: 0.85rem;
        border-radius: 12px;
    }

    .cookie-banner p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 0.5rem;
    }

    .cookie-buttons {
        justify-content: stretch;
    }

    .cookie-buttons .btn {
        flex: 1;
        text-align: center;
        padding: 0.6rem 0.8rem;
    }
}

/* ─── 5. REVIEW CARDS MOBILE ─── */
@media (max-width: 480px) {
    .review-card {
        min-width: 280px !important;
        max-width: 300px !important;
        padding: 1.5rem !important;
    }

    .reviews-scroll-container {
        gap: 1rem;
        padding: 1.5rem 1rem;
    }
}

@media (max-width: 768px) {
    .review-card {
        min-width: 300px;
        max-width: 340px;
        padding: 1.8rem;
    }
}

/* ─── 6. PADDING UTILITIES MOBILE ─── */
@media (max-width: 768px) {
    .p-5 {
        padding: 1.5rem !important;
    }

    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .px-5 {
        padding-left: 1.25rem !important;
        padding-right: 1.25rem !important;
    }

    .mb-5 {
        margin-bottom: 2rem;
    }

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

/* ─── 7. LEGAL LINKS FOOTER ─── */
.legal-bar .legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem 0;
}

.legal-bar .legal-links a {
    position: relative;
    padding: 0.3rem 0.6rem;
    white-space: nowrap;
}

.legal-bar .legal-links a:not(:last-child)::after {
    content: "|";
    position: absolute;
    right: -2px;
    color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 480px) {
    .legal-bar {
        padding: 1rem;
    }

    .legal-bar .legal-links {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .legal-bar .legal-links a {
        margin: 0;
        font-size: 0.8rem;
    }

    .legal-bar .legal-links a:not(:last-child)::after {
        display: none;
    }

    .legal-bar p {
        font-size: 0.7rem;
        margin-top: 0.75rem;
        line-height: 1.4;
    }
}

/* ─── 8. INLINE STYLE OVERRIDES (Filomena, blockquotes, etc.) ─── */
@media (max-width: 768px) {
    .real-experience-section {
        padding: 1.5rem !important;
        border-left-width: 3px !important;
    }

    .story-points li {
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    blockquote {
        padding-left: 1rem !important;
        font-size: 1rem !important;
    }
}

/* ─── 9. SERVICES GRID MOBILE ─── */
@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem;
    }

    .service-card {
        padding: 1.5rem !important;
    }

    .service-card h4 {
        font-size: 1.2rem;
    }
}

/* ─── 10. CTA BANNER MOBILE ─── */
@media (max-width: 768px) {
    .cta-banner {
        padding: 2rem 0;
        margin: 2rem 1rem;
        border-radius: 12px;
    }

    .cta-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .phone-big {
        font-size: 2rem;
    }

    .cta-text h2 {
        font-size: 1.5rem !important;
    }
}

/* ─── 11. COMMUNITIES / VIDEO SECTION MOBILE ─── */
@media (max-width: 900px) {
    .mobile-reverse-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .video-wrapper-9-16 {
        max-width: 280px;
        margin: 0 auto;
    }

    .text-col {
        padding: 1rem !important;
    }
}

/* ─── 12. HERO SECTION MOBILE ─── */
@media (max-width: 480px) {
    .hero-section {
        min-height: 70vh;
    }

    .hero-text-box h1 {
        font-size: 2rem !important;
        line-height: 1.15;
    }

    .badge-hero {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }

    .hero-services-links {
        gap: 0.5rem;
    }

    .service-tag {
        font-size: 0.75rem;
        padding: 0.35rem 0.75rem;
    }
}

/* ─── 13. QUALITY SEALS MOBILE ─── */
@media (max-width: 600px) {
    .quality-seals-section .d-flex {
        flex-direction: column;
        gap: 1.5rem !important;
    }

    .seal-item img {
        height: 70px !important;
    }
}

/* ─── 14. HEADER MOBILE REFINEMENTS ─── */
@media (max-width: 480px) {
    .logo-brand {
        font-size: 1.4rem;
    }

    .logo-title {
        font-size: 0.75rem;
    }

    .header-content {
        padding: 0.5rem 0;
    }
}

/* ─── 15. GENERAL MOBILE TYPOGRAPHY ─── */
@media (max-width: 480px) {
    h3 {
        font-size: 1.2rem !important;
    }

    .lead {
        font-size: 1rem !important;
    }

    .text-sm {
        font-size: 0.85rem;
    }

    /* Prevent any horizontal overflow */
    body {
        overflow-x: hidden;
    }

    main,
    section,
    .container {
        overflow-x: hidden;
    }
}

/* ─── 16. FOOTER GRID MOBILE ─── */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
        padding-bottom: 2rem;
    }

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

    .footer-col h4 {
        display: block;
        text-align: center;
    }

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

    .footer-menu li {
        margin-bottom: 0.5rem;
    }

    .footer-menu a {
        display: inline-block;
        padding: 0.4rem;
    }

    .footer-menu a:hover {
        padding-left: 0.4rem;
    }

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

    .map-placeholder iframe {
        height: 200px;
        border-radius: 8px;
    }

    .address {
        line-height: 1.6;
    }
}

/* ─── 17. PANIC GRID MOBILE ─── */
@media (max-width: 480px) {
    .panic-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ─── 18. GUARANTEE BOX ─── */
.guarantee-box {
    margin-top: 2rem;
    background: rgba(132, 204, 22, 0.08);
    border: 1px solid rgba(132, 204, 22, 0.2);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

@media (max-width: 768px) {
    .guarantee-box {
        padding: 1.5rem;
    }
}

/* ─── 19. FEATURE BADGE ─── */
.feature-badge {
    display: inline-block;
    margin-top: 1rem;
    background: var(--primary-color);
    color: #000;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ─── 20. FAB + COOKIE BANNER SPACING ─── */
@media (max-width: 900px) {
    /* Ensure FAB doesn't overlap with cookie banner */
    .mobile-sticky-bar {
        z-index: 10000;
    }

    .cookie-banner {
        z-index: 9998;
    }
}

/* ─── 21. SAFE AREA (NOTCH) SUPPORT ─── */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    .mobile-sticky-bar {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .legal-bar {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }
}

/* ─── 22. D-FLEX UTILITY (used in HTML but missing from CSS) ─── */
.d-flex {
    display: flex;
}

.justify-content-between {
    justify-content: space-between;
}

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

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

.gap-5 {
    gap: 3rem;
}

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

.text-uppercase {
    text-transform: uppercase;
}

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

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

.text-white {
    color: #fff;
}

.text-info {
    color: #38bdf8;
}

.text-warning {
    color: #fbbf24;
}

.text-success {
    color: #22c55e;
}

.text-danger {
    color: #ef4444;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

/* ─── 23. SMOOTH SCROLL ─── */
html {
    scroll-behavior: smooth;
}

/* ─── 24. FOCUS/ACCESSIBILITY ─── */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ─── 25. SECTION SPACING CONSISTENCY ─── */
@media (max-width: 768px) {
    .value-points-section,
    .services-detailed-section {
        padding: 2.5rem 0;
    }

    .faq-section {
        padding: 3rem 0;
    }

    .reviews-section {
        padding: 3rem 0;
    }

    .csr-section-redesign {
        padding: 3rem 0;
    }

    .economic-section {
        padding: 2rem 0;
    }
}
