/*
Theme Name: Cuik Modular Theme
Theme URI: http://cuikmodular.es
Author: CUIK Modular
Description: Tema personalizado para Cuik Modular.
Version: 1.2 Final Images
*/
:root {
    --primary: #323c2d;
    --accent: #c0a062;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
    position: relative;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* --- COOKIE BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: -100px;
    /* Hidden initially */
    left: 0;
    width: 100%;
    background: #222;
    color: white;
    padding: 1.5rem;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    transition: bottom 0.5s ease;
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-text {
    font-size: 0.9rem;
    max-width: 800px;
}

.cookie-btn {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.cookie-btn:hover {
    background: #d4a017;
    /* Darker accent */
}

img {
    max-width: 100%;
    height: auto;
}

/* --- HEADER & NAV --- */
header {
    position: relative;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    /* Glassmorphism */
}

nav {
    max-width: 100%;
    margin: 0;
    padding: 0.5rem 5%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    width: 100%;
    list-style: none;
}

.nav-links li {
    flex-grow: 1;
    text-align: center;
}

@keyframes logo-entrance {
    0% {
        opacity: 0;
        transform: scale(1.5) rotate(-5deg);
        filter: brightness(2.5) blur(4px);
    }

    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
        filter: brightness(1) blur(0);
    }
}

.logo img {
    height: 130px;
    width: auto;
    transition: var(--transition);
    animation: logo-entrance 2.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.logo img:hover {
    transform: scale(1.05) rotate(2deg);
    filter: brightness(1.1);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

/* --- BUTTONS --- */
.cta-button {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
}

.cta-button:hover {
    background-color: var(--accent);
    transform: translateY(-2px);
    color: white;
}

.btn-secondary {
    background-color: var(--accent);
}

.btn-secondary:hover {
    background-color: var(--primary);
}

/* --- HERO SECTION --- */
/* IMAGEN DE PORTADA ACTUALIZADA */
.hero {
    height: calc(100vh - 220px);
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('https://cuikmodular.es/wp-content/uploads/2025/12/portada.png');
    background-size: cover;
    background-position: center;
    color: var(--white);
    margin-bottom: 4rem;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- GENERAL SECTIONS --- */
.section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* --- CARDS (General) --- */
.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.card-img {
    height: 250px;
    background-color: #eee;
    background-size: cover;
    background-position: center;
}

.card-content {
    padding: 2rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

/* --- MODELS SHOWCASE (Fix for missing photos) --- */
.models-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.model-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.model-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.model-img {
    height: 300px;
    /* Essential for visibility */
    background-size: cover;
    background-position: center;
    position: relative;
    transition: background-image 0.5s ease-in-out;
}

.model-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--accent);
    color: white;
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.model-content {
    padding: 2rem;
    text-align: center;
}

.model-content h3 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.model-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.model-specs {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
}

.spec-item {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}

/* Hover Image Swaps (IMÁGENES TRASERAS ACTUALIZADAS) */
.model-card:hover .single-sunday {
    background-image: url('https://cuikmodular.es/wp-content/uploads/2025/12/modelo-single-sunday-trasera.png') !important;
}

.model-card:hover .max-day {
    background-image: url('https://cuikmodular.es/wp-content/uploads/2025/12/modelo-max-day-trasera.png') !important;
}

.model-card:hover .garajonay {
    background-image: url('https://cuikmodular.es/wp-content/uploads/2025/12/modelo-garajonay-trasera.png') !important;
}

.model-card:hover .tyni-house {
    background-image: url('https://cuikmodular.es/wp-content/uploads/2025/12/tiny-house-interior.png') !important;
}

/* --- TECH CARDS --- */
.tech-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    transition: var(--transition);
}

.tech-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.tech-icon {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: block;
}

/* --- CHARTS --- */
.comparison-section {
    background-color: #fff;
    border-radius: 12px;
}

.chart-container {
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: 100%;
}

.chart-row {
    margin-bottom: 1.5rem;
}

.chart-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.bar-wrapper {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 10px;
    height: 24px;
    overflow: hidden;
}

.bar {
    height: 100%;
    display: flex;
    align-items: center;
    padding-left: 10px;
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
}

.bar-cuik {
    background-color: var(--primary);
}

.bar-trad {
    background-color: #aaa;
}

/* --- FORMS (Mobile Fixed) --- */
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: var(--white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

/* Responsive Grids */
.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

/* --- TESTIMONIALS --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.testimonial-text {
    font-style: italic;
    color: #555;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- FAQ ACCORDION --- */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    background: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: var(--light-bg);
}

.faq-question i {
    transition: transform 0.3s ease;
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: var(--text-light);
    line-height: 1.6;
}

.faq-answer.open {
    padding-bottom: 1.5rem;
    max-height: 500px;
    /* Arbitrary large height */
}


/* --- FOOTER --- */
footer {
    background-color: var(--white);
    padding: 5rem 2rem 2rem;
    border-top: 1px solid #f0f0f0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-column h3 {
    margin-bottom: 1.5rem;
    color: var(--primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
}

/* --- MOBILE SPECIFIC FIXES --- */
/* --- ANIMATIONS (Scroll Reveal) --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- SOCIAL ICONS --- */
.social-icons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: var(--light-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-3px);
}

/* --- BACK TO TOP BUTTON --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    bottom: 30px;
}

.back-to-top:hover {
    background: var(--accent);
    transform: translateY(-3px);
}

/* --- MOBILE MENU & RESPONSIVE --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger Animation */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
        /* Show hamburger */
        position: absolute;
        top: 2rem;
        right: 2rem;
    }

    nav {
        align-items: center;
        /* Align logo center */
        padding: 1rem 2rem;
    }

    .logo img {
        height: 60px;
        /* Smaller logo on mobile */
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        /* Hidden by default */
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 6rem;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        transition: 0.4s ease;
        z-index: 1000;
        gap: 2rem;
    }

    .nav-links.mobile-active {
        right: 0;
        /* Slide in */
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        flex-grow: 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        display: block;
        padding: 0.5rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-cta-container {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-button {
        display: block;
        width: 100%;
        text-align: center;
    }

    /* Force single column forms */
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .models-grid,
    .grid {
        grid-template-columns: 1fr !important;
    }

    .back-to-top {
        right: 20px;
        bottom: 100px;
    }

    .cookie-banner {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.5rem 1.5rem 6rem;
        /* Extra padding for bottom safe area/nav bars */
        width: 90%;
        /* Floating slightly */
        left: 5%;
        bottom: -100% !important;
        /* Hidden by default */
        border-radius: 12px;
    }

    .cookie-banner.show {
        bottom: 20px !important;
    }

    .cookie-btn {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }

    .adn-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Specific ADN Grid for 2x2 Desktop */
.adn-grid {
    grid-template-columns: repeat(2, 1fr);
    max-width: 900px;
    margin: 0 auto;
}