/*
 Theme Name: Climacor Child
 Theme URI: https://climacor.es
 Description: Tema hijo de Astra para Climacor - Aire Acondicionado Córdoba
 Author: ContacPro
 Author URI: https://contacpro.app
 Template: astra
 Version: 1.1.1
 Text Domain: climacor-child
*/

/* === Variables === */
:root {
    --primary: #1565C0;
    --primary-dark: #0D47A1;
    --primary-bg: #1976D2;
    --secondary: #C62828;
    --dark: #1a1a2e;
    --text: #222222;
    --text-light: #555555;
    --bg-light: #F5F7FA;
    --bg-white: #ffffff;
    --border: #e0e0e0;
    --success: #43A047;
    --warning: #FB8C00;
    --radius: 12px;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-hover: 0 8px 30px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

/* === Global === */
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--dark);
}

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

a:hover {
    color: var(--primary-dark);
}

/* Links in content: underline for accessibility (not just color) */
.entry-content a:not(.btn-primary):not(.btn-secondary):not(.btn-hero):not(.coverage-tag) {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.entry-content a:not(.btn-primary):not(.btn-secondary):not(.btn-hero):not(.coverage-tag):hover {
    text-decoration-thickness: 2px;
}

/* === Skip Link (Accessibility) === */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
    z-index: -999;
    color: white;
    text-decoration: none;
}

.skip-link:focus {
    left: 50%;
    transform: translateX(-50%);
    top: 5px;
    width: auto;
    height: auto;
    overflow: visible;
    z-index: 100000;
    background: var(--primary);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    box-shadow: var(--shadow);
}

/* === Focus Visible (Accessibility) === */
a:focus-visible,
button:focus-visible,
.faq-question:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

/* === Astra Overrides === */
.ast-container {
    max-width: 1200px;
}

/* === Header: hidden initially, appears after hero === */
#masthead {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    transform: translateY(-100%);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    background: var(--bg-white);
}

#masthead.header-visible {
    transform: translateY(0);
    box-shadow: 0 2px 20px rgba(0,0,0,0.12);
}

.ast-primary-header-bar {
    background: var(--bg-white);
    box-shadow: none;
}

/* Hide site title text — only logo */
.ast-site-title-wrap .site-title {
    display: none !important;
}

/* Logo responsive */
.site-logo-img img.custom-logo {
    max-height: 100px;
    width: auto;
    transition: var(--transition);
}

/* Buttons */
.wp-block-button__link,
.ast-button,
a.btn-primary,
.btn-primary {
    background: var(--primary-bg) !important;
    color: white !important;
    border-radius: 50px !important;
    padding: 14px 32px !important;
    font-weight: 600 !important;
    font-family: 'Montserrat', sans-serif !important;
    transition: var(--transition) !important;
    border: none !important;
    text-transform: none !important;
    display: inline-block;
    text-align: center;
}

.wp-block-button__link:hover,
.ast-button:hover,
a.btn-primary:hover,
.btn-primary:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(21,101,192,0.4) !important;
    color: white !important;
}

.btn-secondary,
a.btn-secondary {
    background: var(--secondary) !important;
    color: white !important;
    border-radius: 50px !important;
    padding: 14px 32px !important;
    font-weight: 600 !important;
}

.btn-secondary:hover,
a.btn-secondary:hover {
    background: #C62828 !important;
}

/* === Hero Section === */
.hero-section {
    background: linear-gradient(135deg, var(--dark) 0%, #16213e 100%);
    color: white;
    padding: 100px 40px;
    position: relative;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 50px;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-section h1 {
    color: white;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1.15;
    margin-bottom: 0.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    color: var(--primary) !important;
    font-size: clamp(1.1rem, 2.5vw, 1.5rem) !important;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem !important;
}

.hero-desc {
    color: rgba(255,255,255,0.85) !important;
    font-size: 1.1rem !important;
    max-width: 600px;
    margin: 0 auto !important;
    line-height: 1.6;
}

.hero-section p {
    color: rgba(255,255,255,0.9);
    font-size: 1.05rem;
    max-width: 800px;
}

/* Hero fade text animation */
.hero-fade-text {
    transition: opacity 0.8s ease, transform 0.8s ease;
    opacity: 1;
    transform: translateY(0);
}

.hero-fade-text.faded {
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
    position: absolute;
}

/* Hero CTA area */
.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    transition: transform 0.6s ease;
}

.hero-fade-text.faded ~ .hero-cta {
    transform: translateY(-40px);
}

.btn-hero {
    padding: 16px 36px !important;
    font-size: 1.15rem !important;
    border-radius: 50px !important;
    font-weight: 600;
}

.btn-secondary {
    display: inline-block;
    background: transparent;
    color: white;
    border: 2px solid rgba(255,255,255,0.6);
    padding: 14px 32px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
    border-color: white;
    color: white;
}

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

.hero-section .btn-primary {
    margin-top: 10px;
}

.hero-section .badge-urgent,
.hero-section .badge-info {
    margin-bottom: 15px;
}

/* === Sections === */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    margin-top: 60px;
}

.section-title h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* === Features Grid === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* === Service Cards === */
.service-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    text-align: center;
}

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

.service-card h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.service-card ul {
    text-align: left;
    list-style: none;
    padding: 0;
}

.service-card ul li {
    padding: 4px 0;
}

/* === Feature Icon === */
.feature-icon {
    width: 70px;
    height: 70px;
    background: rgba(21,101,192,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary);
}

.feature-item {
    text-align: center;
    padding: 30px 20px;
}

/* === FAQ === */
.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    padding: 20px 25px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--bg-white);
    transition: var(--transition);
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    color: var(--text);
    gap: 15px;
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question span[aria-hidden] {
    font-size: 1.4rem;
    color: var(--primary);
    flex-shrink: 0;
    font-weight: 700;
    width: 24px;
    text-align: center;
}

.faq-answer {
    padding: 0 25px 20px;
    color: var(--text-light);
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question {
    background: var(--bg-light);
}

/* === Pricing Table === */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.pricing-table th {
    background: var(--primary-bg);
    color: white;
    padding: 15px 20px;
    text-align: left;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
}

.pricing-table td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.pricing-table tr:nth-child(even) {
    background: var(--bg-light);
}

.pricing-table tr:hover {
    background: rgba(21,101,192,0.05);
}

/* === Coverage Zone === */
.coverage-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.coverage-tag {
    background: rgba(21,101,192,0.12);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.coverage-tag:hover {
    background: rgba(21,101,192,0.22);
}

/* === Reviews === */
.review-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
}

.review-card h3 {
    color: var(--primary);
    margin-bottom: 10px;
}

.review-stars {
    color: #FFC107;
    margin-bottom: 10px;
    font-size: 1.2rem;
    letter-spacing: 2px;
}

.review-author {
    font-weight: 600;
    color: var(--dark);
    margin-top: 15px;
    font-style: italic;
}

/* === WhatsApp Float === */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.whatsapp-float a {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.whatsapp-float a:hover {
    transform: scale(1.1);
    color: white;
}

.whatsapp-float .wa-btn {
    background: #25D366;
}

.whatsapp-float .phone-btn {
    background: var(--primary-bg);
}

/* === CTA Section === */
.cta-section {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--primary) 100%);
    color: white;
    padding: 60px 40px;
    text-align: center;
    border-radius: var(--radius);
    margin-top: 60px;
    margin-bottom: 20px;
}

.cta-section h2 {
    color: white;
    margin-bottom: 15px;
}

.cta-section p {
    color: rgba(255,255,255,0.9);
}

.cta-section .btn-primary {
    background: white !important;
    color: var(--primary) !important;
    margin-top: 10px;
}

.cta-section .btn-primary:hover {
    background: var(--bg-light) !important;
    color: var(--primary-dark) !important;
}

/* === Footer === */
.ast-footer {
    background: var(--dark) !important;
}

/* === Breadcrumbs === */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary);
}

/* === Badges === */
.badge-urgent {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-info {
    display: inline-block;
    background: var(--primary-bg);
    color: white;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* === Ordered Lists (Steps) === */
.entry-content ol {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.entry-content ol li {
    counter-increment: step-counter;
    padding: 20px 20px 20px 70px;
    position: relative;
    margin-bottom: 15px;
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.entry-content ol li::before {
    content: counter(step-counter);
    position: absolute;
    left: 20px;
    top: 20px;
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
}

/* === Responsive === */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 20px;
        min-height: 75vh;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .btn-hero {
        padding: 14px 28px !important;
        font-size: 1rem !important;
    }

    .section-title {
        margin-top: 40px;
        margin-bottom: 25px;
    }

    .section-title h2 {
        font-size: 1.4rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 20px;
    }

    .cta-section {
        padding: 40px 25px;
    }

    .pricing-table {
        font-size: 0.85rem;
    }

    .pricing-table th,
    .pricing-table td {
        padding: 10px 12px;
    }

    .entry-content ol li {
        padding: 15px 15px 15px 55px;
    }

    .entry-content ol li::before {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
        left: 12px;
        top: 15px;
    }

    .faq-question {
        padding: 15px 18px;
        font-size: 0.95rem;
    }

    .review-card {
        padding: 20px;
    }
}

/* === Scroll Reveal Animations === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }

/* Stagger children in grids */
.features-grid.reveal.visible .service-card,
.features-grid.reveal.visible .review-card {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.features-grid.reveal.visible .service-card:nth-child(1),
.features-grid.reveal.visible .review-card:nth-child(1) { animation-delay: 0.05s; }
.features-grid.reveal.visible .service-card:nth-child(2),
.features-grid.reveal.visible .review-card:nth-child(2) { animation-delay: 0.15s; }
.features-grid.reveal.visible .service-card:nth-child(3),
.features-grid.reveal.visible .review-card:nth-child(3) { animation-delay: 0.25s; }
.features-grid.reveal.visible .service-card:nth-child(4) { animation-delay: 0.35s; }
.features-grid.reveal.visible .service-card:nth-child(5) { animation-delay: 0.45s; }
.features-grid.reveal.visible .service-card:nth-child(6) { animation-delay: 0.55s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(25px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* === Hamburger button styling === */
.menu-toggle.ast-mobile-menu-trigger-minimal {
    background: var(--primary-bg) !important;
    border-radius: 10px !important;
    padding: 8px 10px !important;
    color: white !important;
    transition: var(--transition);
}

.menu-toggle.ast-mobile-menu-trigger-minimal:hover,
.menu-toggle.ast-mobile-menu-trigger-minimal:focus {
    background: var(--primary-dark) !important;
    transform: scale(1.05);
}

.menu-toggle.ast-mobile-menu-trigger-minimal svg {
    fill: white !important;
}

/* === Mobile menu dropdown === */
.ast-mobile-header-content {
    background: var(--bg-white);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border-top: 3px solid var(--primary);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ast-mobile-header-content .menu-link {
    padding: 14px 20px !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text) !important;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    display: block;
}

.ast-mobile-header-content .menu-link:hover,
.ast-mobile-header-content .current-menu-item .menu-link {
    color: var(--primary) !important;
    background: var(--bg-light);
    padding-left: 25px !important;
}

.ast-mobile-header-content .current-menu-item .menu-link {
    border-left: 3px solid var(--primary);
}

/* === Desktop nav links styling === */
#ast-desktop-header .menu-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

#ast-desktop-header .current-menu-item .menu-link {
    color: var(--primary) !important;
}

/* Logo responsive sizing */
@media (max-width: 768px) {
    .site-logo-img img.custom-logo {
        max-height: 75px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 70vh;
    }

    .hero-section h1 {
        font-size: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .coverage-tags {
        gap: 8px;
    }

    .coverage-tag {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .whatsapp-float a {
        width: 50px;
        height: 50px;
    }
}
/* ===== Inline page images ===== */
.page-image {
    width: 100%;
    max-width: 1024px;
    height: auto;
    border-radius: var(--radius);
    margin: 2rem auto;
    display: block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    .page-image {
        border-radius: 8px;
        margin: 1.5rem auto;
    }
}

/* ===== Split Hero (HOME) ===== */
.hero-section.hero-split {
    flex-direction: row;
    text-align: left;
    align-items: center;
    gap: 3rem;
    padding: 3rem 5%;
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    min-height: 85vh;
}

.hero-split .hero-content {
    flex: 1;
    max-width: 50%;
}

.hero-split .hero-content h1 {
    font-size: 2.6rem;
    margin-bottom: 0.8rem;
    line-height: 1.2;
}

.hero-split .hero-content .hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.hero-split .hero-content .hero-desc {
    font-size: 1.05rem;
    opacity: 0.85;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.hero-split .hero-cta {
    justify-content: flex-start;
}

.hero-split .hero-image {
    flex: 1;
    max-width: 50%;
}

.hero-split .hero-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

@media (max-width: 992px) {
    .hero-section.hero-split {
        gap: 2rem;
        padding: 2.5rem 4%;
        min-height: 70vh;
    }

    .hero-split .hero-content h1 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-section.hero-split {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
        min-height: auto;
        gap: 1.5rem;
    }

    .hero-split .hero-content,
    .hero-split .hero-image {
        max-width: 100%;
    }

    .hero-split .hero-content h1 {
        font-size: 1.7rem;
    }

    .hero-split .hero-content .hero-subtitle {
        font-size: 1rem;
    }

    .hero-split .hero-content .hero-desc {
        font-size: 0.95rem;
    }

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

    .hero-split .hero-image img {
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    }
}

/* ===== Hero split: fade text after 5s ===== */
.hero-split .hero-fade-text {
    transition: opacity 1s ease, transform 1s ease;
}

.hero-split .hero-fade-text.faded {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    position: absolute;
}

/* Mobile: image on top (before text) */
@media (max-width: 768px) {
    .hero-section.hero-split {
        flex-direction: column;
    }

    .hero-split .hero-image {
        order: -1;
    }

    .hero-split .hero-content {
        order: 1;
    }
}
