/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://agrpuertas.com
 Description:  Child theme de Hello Elementor con mega-menu custom para AGR Puertas.
 Author:       SEO en Mexico / CONSEO
 Author URI:   https://seoenmexico.com
 Template:     hello-elementor
 Version:      2.0.0
 Text Domain:  hello-elementor-child
*/

/* ==========================================================================
   AGR PUERTAS — DESIGN SYSTEM + HOMEPAGE COMPONENTS
   
   Las variables de color base (--agr-navy, --agr-sky, etc.) se definen
   en functions.php (mega-menú CSS). Aquí las extendemos y creamos
   todos los componentes del rediseño.
   
   NOTA: No duplicar las variables ya definidas en functions.php:
   --agr-navy, --agr-navy-deep, --agr-sky, --agr-sky-light, --agr-white,
   --agr-gray-50/100/200/400/600/800, --agr-red, --agr-ease, 
   --agr-shadow-sm, --agr-shadow-lg
   ========================================================================== */

:root {
    --agr-green: #25d366;
}

/* ==========================================================================
   BASE / RESETS
   ========================================================================== */
img { max-width: 100%; display: block; }

/* ==========================================================================
   TYPOGRAPHY (reutilizable en todas las páginas)
   ========================================================================== */
.agr-page h1 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 800; line-height: 1.15; color: var(--agr-white); }
.agr-page h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; line-height: 1.2; color: var(--agr-navy); }
.agr-page h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 1.1rem; font-weight: 700; line-height: 1.3; color: var(--agr-navy); }
.agr-page p { line-height: 1.7; color: var(--agr-gray-600); }

/* ==========================================================================
   UTILITIES (reutilizables)
   ========================================================================== */
.agr-container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }

.section-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.14em;
    color: var(--agr-sky);
    margin-bottom: 0.75rem;
    display: flex; align-items: center; gap: 0.5rem;
}
.section-label::before {
    content: '';
    width: 24px; height: 2px;
    background: var(--agr-sky);
    border-radius: 1px;
}

/* ==========================================================================
   BUTTONS (reutilizables en todas las páginas)
   ========================================================================== */
.btn-primary {
    display: inline-flex; align-items: center; gap: 0.6rem;
    background: var(--agr-sky); color: var(--agr-white);
    font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 700;
    padding: 0.85rem 1.8rem; border-radius: 10px;
    transition: all 0.25s ease; border: none; cursor: pointer;
    text-decoration: none;
}
.btn-primary:hover { background: #1590c4; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(29,166,223,0.3); color: var(--agr-white); }

.btn-secondary {
    display: inline-flex; align-items: center; gap: 0.6rem;
    background: transparent; color: var(--agr-white);
    font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 600;
    padding: 0.85rem 1.8rem; border-radius: 10px;
    border: 2px solid rgba(255,255,255,0.4); cursor: pointer;
    transition: all 0.25s ease; text-decoration: none;
}
.btn-secondary:hover { border-color: var(--agr-white); background: rgba(255,255,255,0.1); color: var(--agr-white); }

.btn-navy {
    display: inline-flex; align-items: center; gap: 0.6rem;
    background: var(--agr-navy); color: var(--agr-white);
    font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 700;
    padding: 0.85rem 1.8rem; border-radius: 10px;
    transition: all 0.25s ease; border: none; cursor: pointer;
    text-decoration: none;
}
.btn-navy:hover { background: var(--agr-sky); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(29,166,223,0.3); color: var(--agr-white); }

.btn-wa {
    display: inline-flex; align-items: center; gap: 0.6rem;
    background: var(--agr-green); color: var(--agr-white);
    font-family: 'DM Sans', sans-serif; font-size: 0.9rem; font-weight: 700;
    padding: 0.85rem 1.8rem; border-radius: 10px;
    transition: all 0.25s ease; border: none; cursor: pointer;
    text-decoration: none;
}
.btn-wa:hover { background: #1eba59; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(37,211,102,0.3); color: var(--agr-white); }

/* ==========================================================================
   SECTION 1: HERO
   ========================================================================== */
.hero {
    position: relative;
    min-height: 85vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--agr-navy-deep) 0%, var(--agr-navy) 60%, #1e3a6e 100%);
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}
.hero-grid {
    position: absolute; right: -5%; top: 50%; transform: translateY(-50%);
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(29,166,223,0.15) 0%, transparent 70%);
    border-radius: 50%;
}
.hero .agr-container { position: relative; z-index: 2; }
.hero-content { max-width: 680px; }
.hero-eyebrow {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.15em;
    color: var(--agr-sky);
    margin-bottom: 1.25rem;
    display: flex; align-items: center; gap: 0.75rem;
}
.hero-eyebrow .line { width: 32px; height: 2px; background: var(--agr-sky); }
.hero h1 span { color: var(--agr-sky); }
.hero-sub {
    font-size: 1.1rem; line-height: 1.7;
    color: rgba(255,255,255,0.75);
    margin: 1.5rem 0 2rem;
    max-width: 560px;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats {
    display: flex; gap: 3rem; margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem; font-weight: 800; color: var(--agr-white);
}
.hero-stat-label {
    font-size: 0.8rem; color: rgba(255,255,255,0.5);
    margin-top: 0.25rem;
}

/* ==========================================================================
   SECTION 2: TRUST BAR
   ========================================================================== */
.trust-bar {
    background: var(--agr-white);
    border-bottom: 1px solid var(--agr-gray-200);
    padding: 1.5rem 0;
    position: relative;
}
.trust-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.trust-item {
    display: flex; align-items: center; gap: 0.75rem;
    font-size: 0.85rem; font-weight: 600; color: var(--agr-gray-600);
}
.trust-icon {
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--agr-sky-light);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.trust-icon svg { width: 20px; height: 20px; stroke: var(--agr-sky); fill: none; stroke-width: 2; }

/* ==========================================================================
   SECTION 3: PRODUCTS
   ========================================================================== */
.products {
    padding: 5rem 0;
    position: relative;
}
.products-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}
.products-header .section-label { justify-content: center; }
.products-header p { margin-top: 1rem; }

.product-categories {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.product-category {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--agr-gray-50);
    border: 1px solid var(--agr-gray-200);
    transition: all 0.3s ease;
}
.product-category:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(17,22,64,0.1);
    border-color: var(--agr-sky);
}
.product-cat-img {
    height: 180px;
    background: linear-gradient(135deg, var(--agr-navy) 0%, #2a3a7e 100%);
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
}
.product-cat-img::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 60%;
    background: linear-gradient(to top, rgba(17,22,64,0.8), transparent);
}
.product-cat-icon {
    width: 64px; height: 64px;
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(8px);
    position: relative; z-index: 2;
}
.product-cat-icon svg { width: 28px; height: 28px; stroke: var(--agr-white); fill: none; stroke-width: 1.5; }
.product-cat-body { padding: 1.25rem; }
.product-cat-body h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.product-cat-body p { font-size: 0.82rem; line-height: 1.5; color: var(--agr-gray-400); }
.product-cat-links {
    padding: 0 1.25rem 1.25rem;
    display: flex; flex-direction: column; gap: 0.35rem;
}
.product-cat-link {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.8rem; font-weight: 500; color: var(--agr-gray-600);
    padding: 0.35rem 0;
    transition: color 0.2s;
    text-decoration: none;
}
.product-cat-link:hover { color: var(--agr-sky); }
.product-cat-link svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.product-badge {
    font-size: 0.55rem; font-weight: 700; text-transform: uppercase;
    padding: 0.1rem 0.35rem; border-radius: 3px;
    background: var(--agr-red); color: white; margin-left: 0.35rem;
}

/* ==========================================================================
   SECTION 4: BY APPLICATION
   ========================================================================== */
.by-application {
    padding: 5rem 0;
    background: var(--agr-gray-50);
}
.by-app-header { margin-bottom: 3rem; }
.by-app-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.app-card {
    background: var(--agr-white);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--agr-gray-200);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: block;
}
.app-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(17,22,64,0.08);
}
.app-card-img {
    height: 140px;
    background: linear-gradient(135deg, var(--agr-navy) 0%, #1e3a6e 100%);
    display: flex; align-items: center; justify-content: center;
}
.app-card-icon {
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
}
.app-card-icon svg { width: 24px; height: 24px; stroke: white; fill: none; stroke-width: 1.5; }
.app-card-body { padding: 1.25rem; }
.app-card-body h3 { font-size: 0.95rem; margin-bottom: 0.4rem; }
.app-card-body p { font-size: 0.8rem; color: var(--agr-gray-400); line-height: 1.5; }

/* ==========================================================================
   SECTION 5: WHY AGR (DIFFERENTIATORS)
   ========================================================================== */
.why-agr {
    padding: 5rem 0;
}
.why-agr-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.why-agr-content h2 { margin-bottom: 1.25rem; }
.why-agr-content > p { margin-bottom: 2rem; }
.diff-list { display: flex; flex-direction: column; gap: 1.25rem; }
.diff-item {
    display: flex; gap: 1rem; align-items: flex-start;
    padding: 1rem;
    border-radius: 12px;
    transition: background 0.2s;
}
.diff-item:hover { background: var(--agr-sky-light); }
.diff-icon {
    width: 44px; height: 44px; border-radius: 12px;
    background: var(--agr-sky-light);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.diff-icon svg { width: 22px; height: 22px; stroke: var(--agr-sky); fill: none; stroke-width: 2; }
.diff-text h4 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem; font-weight: 700; color: var(--agr-navy);
    margin-bottom: 0.25rem;
}
.diff-text p { font-size: 0.82rem; color: var(--agr-gray-400); line-height: 1.5; }

.why-agr-visual {
    background: var(--agr-gray-50);
    border-radius: 20px;
    padding: 2.5rem;
    border: 1px solid var(--agr-gray-200);
    position: relative;
}
.cert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.cert-card {
    background: var(--agr-white);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--agr-gray-200);
    transition: all 0.3s;
}
.cert-card:hover { border-color: var(--agr-sky); box-shadow: 0 4px 16px rgba(29,166,223,0.1); }
.cert-label {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--agr-sky); margin-bottom: 0.5rem;
}
.cert-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.8rem; font-weight: 800;
    color: var(--agr-navy);
}
.cert-desc { font-size: 0.75rem; color: var(--agr-gray-400); margin-top: 0.25rem; }

/* ==========================================================================
   SECTION 6: SOCIAL PROOF
   ========================================================================== */
.social-proof {
    padding: 4rem 0;
    background: var(--agr-navy-deep);
    position: relative;
    overflow: hidden;
}
.social-proof::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse at 20% 50%, rgba(29,166,223,0.1), transparent 70%);
}
.social-proof .agr-container { position: relative; z-index: 2; text-align: center; }
.social-proof h2 { color: var(--agr-white); margin-bottom: 0.75rem; }
.logos-grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}
.logo-placeholder {
    width: 120px; height: 50px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.65rem; font-weight: 600; color: rgba(255,255,255,0.3);
    text-transform: uppercase; letter-spacing: 0.05em;
}
.proof-stats {
    display: flex; justify-content: center; gap: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.08);
}
.proof-stat-number {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.2rem; font-weight: 800; color: var(--agr-sky);
}
.proof-stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 0.25rem; }

/* ==========================================================================
   SECTION 7: ABOUT (CONDENSED)
   ========================================================================== */
.about {
    padding: 5rem 0;
}
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-visual {
    background: linear-gradient(135deg, var(--agr-navy) 0%, #1e3a6e 100%);
    border-radius: 20px;
    height: 400px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    overflow: hidden;
}
.about-visual img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.about-visual-text {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.8rem; font-weight: 600;
    color: rgba(255,255,255,0.3);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.about-years {
    position: absolute; bottom: 1.5rem; left: 1.5rem;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    display: flex; align-items: center; gap: 0.75rem;
}
.about-years-num {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2rem; font-weight: 800; color: var(--agr-white);
    line-height: 1;
}
.about-years-text { font-size: 0.75rem; color: rgba(255,255,255,0.7); line-height: 1.3; }
.about-content h2 { margin-bottom: 1.25rem; }
.about-content > p { margin-bottom: 1.5rem; }
.about-locations {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
    margin-top: 1.5rem;
}
.location-tag {
    display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.82rem; font-weight: 500; color: var(--agr-gray-600);
    padding: 0.6rem 0.9rem;
    background: var(--agr-gray-50);
    border-radius: 8px;
}
.location-tag svg { width: 14px; height: 14px; stroke: var(--agr-sky); fill: none; stroke-width: 2; }

/* ==========================================================================
   SECTION 8: FAQ
   ========================================================================== */
.faq {
    padding: 5rem 0;
    background: var(--agr-gray-50);
}
.faq-header { text-align: center; max-width: 600px; margin: 0 auto 3rem; }
.faq-header .section-label { justify-content: center; }
.faq-grid { max-width: 800px; margin: 0 auto; }
.faq-item {
    background: var(--agr-white);
    border: 1px solid var(--agr-gray-200);
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.faq-question {
    padding: 1.25rem 1.5rem;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.95rem; font-weight: 600;
    color: var(--agr-navy);
    cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    transition: background 0.2s;
}
.faq-question:hover { background: var(--agr-sky-light); }
.faq-question svg { width: 18px; height: 18px; stroke: var(--agr-gray-400); fill: none; stroke-width: 2; flex-shrink: 0; transition: transform 0.3s; }
.faq-item.open .faq-question svg { transform: rotate(180deg); }
.faq-answer {
    max-height: 0; overflow: hidden;
    transition: max-height 0.3s ease;
}
.faq-item.open .faq-answer { max-height: 300px; }
.faq-answer-inner {
    padding: 0 1.5rem 1.25rem;
    font-size: 0.88rem; line-height: 1.7;
    color: var(--agr-gray-600);
}

/* ==========================================================================
   SECTION 9: FINAL CTA
   ========================================================================== */
.final-cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, var(--agr-navy-deep) 0%, var(--agr-navy) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.final-cta::before {
    content: '';
    position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(29,166,223,0.12), transparent 70%);
    border-radius: 50%;
}
.final-cta .agr-container { position: relative; z-index: 2; }
.final-cta h2 { color: var(--agr-white); margin-bottom: 1rem; }
.final-cta p { color: rgba(255,255,255,0.6); max-width: 500px; margin: 0 auto 2rem; }
.final-cta-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   ELEMENTOR OVERRIDES
   ========================================================================== */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header.site-header,
.elementor-location-header {
    display: none !important;
}

/* Fix Elementor link color overrides inside our sections */
.agr-page a.btn-primary,
.agr-page a.btn-secondary,
.agr-page a.btn-navy,
.agr-page a.btn-wa,
.agr-page a.product-cat-link,
.agr-page a.app-card {
    text-decoration: none !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1024px) {
    .product-categories { grid-template-columns: 1fr 1fr; }
    .by-app-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .hero { min-height: 70vh; }
    .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
    .hero-stat-number { font-size: 1.6rem; }
    .product-categories { grid-template-columns: 1fr; }
    .by-app-grid { grid-template-columns: 1fr; }
    .why-agr-grid, .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .cert-grid { grid-template-columns: 1fr 1fr; }
    .proof-stats { gap: 2rem; flex-wrap: wrap; }
    .about-locations { grid-template-columns: 1fr; }
    .about-visual { height: 280px; }
    .trust-bar-inner { justify-content: center; }
    .agr-container { padding: 0 1.25rem; }
}