/* global.css - Roof Solution PR Master Stylesheet */

:root {
    --primary: #0a2463;
    --primary-light: #1a3b8a;
    --secondary: #0073e6;
    --accent: #00c897;
    --accent-dark: #009d75;
    --light: #f5f7fa;
    --dark: #222;
    --text: #333;
    --white: #ffffff;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    --transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --border-radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
    font-size: 1.05rem;
    width: 100%;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
}

/* Texture Overlay */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Avoid heavy transitions for reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Base Buttons */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: var(--white);
    padding: 16px 36px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 6px 20px rgba(0, 200, 151, 0.3);
    border: none;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: transform 220ms ease, box-shadow 220ms ease;
    will-change: transform;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-dark) 0%, #008a68 100%);
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 200, 151, 0.4);
}

.btn:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary) 0%, #005bb5 100%);
    box-shadow: 0 6px 20px rgba(0, 115, 230, 0.3);
}

.btn-secondary::before {
    background: linear-gradient(135deg, #005bb5 0%, #004a94 100%);
}

/* ===========================
   FLOATING WIDGETS (WhatsApp & Tawk.to)
   =========================== */
:root {
    --float-size: 60px;
    --float-right: 30px;
    --float-bottom-chat: 30px;
    --float-gap: 14px;
    /* Separación vertical exacta entre ambos */
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    right: var(--float-right);
    bottom: calc(var(--float-bottom-chat) + var(--float-size) + var(--float-gap));
    width: var(--float-size);
    height: var(--float-size);
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
    z-index: 1001;
    /* Por encima del chat */
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
    box-sizing: border-box;
    transform: translateZ(0);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6);
    transform: scale(1.08) translateY(-5px);
    animation: none;
}

/* Alineación base recomendada para el widget Tawk.to */
#tawkchat-minified,
#tawkchat-container,
#tawkchat-widget-container,
#tawkchat-widget-iframe,
#tawkchat-widget {
    right: var(--float-right);
    bottom: var(--float-bottom-chat);
    z-index: 1000;
}



/* Mobile: Misma lógica con tamaños reducidos */
@media (max-width: 900px) {
    :root {
        --float-size: 52px;
        --float-right: 20px;
        --float-bottom-chat: 20px;
        /* +2px */
        --float-gap: 28px;
        /* +8px: más separación entre chat y WhatsApp */
    }

    /* Corrección Global Hero: Evita solapamiento con Header Fijo */
    .hero {
        margin-top: 110px !important;
        /* Espacio para la cabecera blanca */
        min-height: auto !important;
        /* Altura flexible según contenido */
        height: auto !important;
        /* Sobrescribe 100vh de escritorio */
        align-items: flex-start !important;
        /* Evita que el contenido se centre y suba */
        padding: 50px 0 100px !important;
        /* Espaciado interno profesional */
    }

    .hero-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    /* Elevar el botón de WhatsApp (asumiendo que el chat tawk nativo es ~60px) */
    .whatsapp-float {
        right: var(--float-right) !important;
        bottom: calc(var(--float-bottom-chat) + 60px + 16px) !important;
        width: var(--float-size) !important;
        height: var(--float-size) !important;
        font-size: 1.9rem !important;
    }

    /* Alineación base recomendada para el widget del chat (minimizado) en móvil */
    #tawkchat-minified,
    #tawkchat-container,
    #tawkchat-widget-container,
    #tawkchat-widget-iframe,
    #tawkchat-widget {
        right: var(--float-right);
        bottom: var(--float-bottom-chat);
    }
}

/* Animations Shared */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 10px 30px rgba(37, 211, 102, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 6px 25px rgba(37, 211, 102, 0.4);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Shared */
section {
    padding: 110px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 70px;
    position: relative;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 5px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 3px;
}

.section-title p {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 700px;
    margin: 30px auto 0;
    line-height: 1.8;
}


/* ===========================
   HEADER & NAVIGATION 
   =========================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    padding: 18px 0;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

header.scrolled {
    padding: 12px 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-icon {
    width: 130px;
    height: 130px;
    margin-right: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible;
    padding: 0;
}

.logo-icon img {
    width: 130%;
    height: 130%;
    object-fit: contain;
    background: transparent !important;
    border-radius: 0 !important;
    display: block;
    box-shadow: none !important;
    filter: none !important;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text h1 {
    font-size: 1.7rem;
    color: var(--primary);
    line-height: 1.2;
    letter-spacing: -0.5px;
    margin: 0px;
}

.logo-text span {
    font-size: 1rem;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 1px;
    margin: 0px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    padding: 8px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: var(--transition);
    border-radius: 3px;
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: var(--accent);
}

.mobile-toggle {
    display: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

@media (max-width: 900px) {
    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--white);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        z-index: 1000;
    }

    nav.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 20px 0;
    }

    nav ul li a {
        font-size: 1.3rem;
    }

    .logo-icon {
        width: 100px;
        height: 100px;
    }

    .logo-text h1 {
        font-size: 1.4rem;
    }
}


/* ===========================
   FOOTER LAYER
   =========================== */
footer {
    background: linear-gradient(135deg, var(--primary) 0%, #092056 100%);
    color: var(--white);
    padding: 80px 0 40px;
    margin-top: 100px;
    position: relative;
    font-family: 'Poppins', sans-serif;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 15px;
    background: linear-gradient(90deg, var(--accent), var(--secondary));
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-left {
    display: flex;
    flex-direction: row;
    gap: 40px;
    flex-wrap: nowrap;
    flex: 1 1 auto;
}

.footer-col {
    flex: 0 0 auto;
    min-width: 200px;
}

.footer-col h3 {
    font-family: 'Montserrat', sans-serif;
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent);
}

.footer-col p {
    font-size: 1.13rem;
    color: #fff;
    line-height: 1.7;
    margin-top: 0;
    margin-bottom: 28px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.footer-col ul li a:hover {
    color: var(--accent);
    text-decoration: none;
}

.footer-col ul li a i {
    width: 24px;
    color: var(--accent);
    margin-right: 8px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-top: 18px;
    width: 100%;
}

.footer-line {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
    height: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16) !important;
    margin: 10px 0 6px 0;
}

.footer-trust-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 500;
}

.trust-item i {
    color: var(--accent);
    font-size: 1.2rem;
}

@media (max-width: 768px) {
    .footer-trust-bar {
        gap: 20px;
        flex-direction: column;
        align-items: flex-start;
        padding-left: 20px;
    }
}

.footer-copyright {
    white-space: normal;
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.92rem;
    padding: 6px 0;
    text-align: center;
}

@media (min-width: 901px) {
    .footer-main {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        gap: 40px;
    }

    .footer-left {
        display: flex;
        flex-direction: row;
        gap: 40px;
        flex-wrap: nowrap;
        align-items: flex-start;
    }

    .footer-col {
        text-align: left !important;
        min-width: 150px;
        flex: 1 1 0;
    }

    footer .footer-col h2 {
        display: inline-block !important;
        text-align: left !important;
        margin: 0 0 15px 0 !important;
    }

    footer .footer-col h2>span {
        position: absolute !important;
        left: 0 !important;
        bottom: 0 !important;
    }
}

@media (max-width: 900px) {
    .footer-main {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .footer-left {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        width: 100%;
    }

    .footer-col {
        width: 98vw;
        max-width: 420px;
        margin: 0 auto;
        text-align: center !important;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
    }

    .footer-line {
        width: 90%;
        border-top-color: rgba(255, 255, 255, 0.16) !important;
    }

    .footer-copyright {
        text-align: center;
    }

    footer .footer-col h2 {
        display: block !important;
        text-align: center !important;
        color: #fff !important;
        font-weight: 700 !important;
        margin: 0 0 12px 0 !important;
        padding: 0 !important;
    }

    footer .footer-col h2>span {
        position: static !important;
        display: block !important;
        margin: 8px auto 0 !important;
        width: 64px !important;
        height: 5px !important;
        background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%) !important;
        border-radius: 4px !important;
    }

    .footer-col h3 {
        margin-bottom: 20px;
    }

    .footer-col h3::after {
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

@media (max-width: 576px) {
    footer {
        padding-bottom: 140px;
    }

    .footer-main {
        gap: 18px;
        padding: 20px 0 0;
    }

    .footer-col p {
        text-align: center;
        padding: 0 14px;
        font-size: 1rem;
    }

    .footer-col ul {
        padding: 0 8px;
    }

    footer .footer-col h2 {
        display: block !important;
        text-align: center !important;
        font-size: 1.35rem !important;
        margin-bottom: 10px !important;
    }

    footer .footer-col h2>span {
        width: 56px !important;
        height: 4px !important;
        margin: 6px auto 0 !important;
        position: static !important;
    }

    .footer-bottom {
        flex-direction: column-reverse;
        gap: 10px;
        align-items: center;
    }

    .footer-line {
        width: 80%;
        border-top-color: rgba(255, 255, 255, 0.16) !important;
    }

    .footer-copyright {
        max-width: 360px;
        text-align: center;
        font-size: 0.98rem;
    }

    .whatsapp {
        width: 62px;
        height: 62px;
        bottom: 18px;
        right: 14px;
        font-size: 2rem;
    }
}