/* =============================================
   IDEA ACT — style.css
   Optimized for mobile performance
   ============================================= */

:root {
    --bg-color: #ffffff;
    --surface-color: #f9f9f9;
    --text-main: #111111;
    --text-sub: #666666;
    --accent-color: #111111;
    --accent-hover: #333333;
    --whatsapp-color: #25D366;
    --border-radius: 4px;
    --container-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Manrope', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.03em; color: var(--text-main); margin-bottom: 1rem; }
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 700; }
h4 { font-size: 1.1rem; font-weight: 700; }
p  { color: var(--text-sub); font-size: 1.05rem; margin-bottom: 1.5rem; }
a  { text-decoration: none; color: inherit; transition: opacity 0.2s; }
a:hover { opacity: 0.7; }

/* Layout */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }
.section { padding: 100px 0; }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 16px 32px; font-size: 0.95rem; font-weight: 700;
    border-radius: var(--border-radius); cursor: pointer;
    transition: all 0.2s ease; border: 1px solid transparent;
    gap: 10px; font-family: inherit;
    /* PERFORMANCE: GPU-accelerated transitions only */
    will-change: transform;
}
.btn-primary  { background: var(--accent-color); color: white; }
.btn-primary:hover  { background: var(--accent-hover); transform: translateY(-2px); opacity: 1; }
.btn-outline  { background: transparent; border: 1px solid #eaeaea; color: var(--text-main); }
.btn-outline:hover  { border-color: var(--text-main); opacity: 1; }
.btn-whatsapp { background: var(--whatsapp-color); color: white; }
.btn-whatsapp:hover { background: #1ebc57; opacity: 1; }

/* Cards */
.card {
    background: var(--surface-color);
    padding: 40px;
    border-radius: var(--border-radius);
    transition: transform 0.3s ease;
    /* PERFORMANCE: promotes to own layer, smoother hover */
    will-change: transform;
}
.card:hover { transform: translateY(-5px); }

/* Grids */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: stretch; }

/* Forms */
.form-group { margin-bottom: 24px; }
label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 8px; color: var(--text-main); }
input, select, textarea {
    width: 100%; padding: 14px; border: 1px solid #eaeaea;
    background: white; font-family: inherit; font-size: 1rem;
    outline: none; transition: border-color 0.2s; border-radius: var(--border-radius);
    /* PERFORMANCE: prevents iOS zoom on input focus (needs font-size >= 16px) */
    font-size: 16px;
}
input:focus, select:focus, textarea:focus { border-color: var(--text-main); }

/* Navigation */
nav {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
    z-index: 100; border-bottom: 1px solid #eaeaea;
}
.nav-inner { height: 70px; display: flex; align-items: center; justify-content: space-between; }
.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a { font-size: 0.9rem; font-weight: 500; color: var(--text-sub); }
.nav-links a.active { color: var(--text-main); font-weight: 700; }
.mobile-toggle { display: none; background: none; border: none; font-size: 1.5rem; cursor: pointer; padding: 8px; }

/* Mobile menu */
#mobile-menu {
    display: none; position: fixed; top: 70px; left: 0; width: 100%;
    background: white; border-bottom: 1px solid #eee; z-index: 99; padding: 20px;
}
#mobile-menu a { display: block; padding: 10px 0; font-weight: 500; border-bottom: 1px solid #f5f5f5; }

/* Product Cards */
.product-card {
    background: var(--surface-color); border-radius: var(--border-radius);
    overflow: hidden; display: flex; flex-direction: column;
    height: 100%; transition: transform 0.3s ease; padding: 0;
    will-change: transform;
}
.product-card:hover { transform: translateY(-5px); }

/* PERFORMANCE: aspect-ratio reserves space before image loads = no CLS */
.product-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    /* Smooth image rendering */
    image-rendering: auto;
}

.product-content { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.product-desc { font-size: 0.9rem; color: var(--text-sub); margin-bottom: 0; min-height: 60px; }
.product-divider {
    border-top: 1px solid #eaeaea;
    padding-top: 15px;
    margin-top: auto;
    min-height: 115px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}
.product-list { list-style: none; padding: 0; margin: 0; font-size: 0.85rem; color: var(--text-sub); }
.product-list li { margin-bottom: 6px; display: flex; align-items: center; }
.product-list li:last-child { margin-bottom: 0; }
.product-list .bullet { color: var(--accent-color); margin-right: 6px; font-weight: bold; }

/* Footer */
footer {
    border-top: 1px solid #eaeaea; padding: 60px 0;
    margin-top: 80px; background: var(--surface-color);
}

/* Page hero */
.page-hero {
    padding-top: 150px; padding-bottom: 80px;
    background: linear-gradient(180deg, #f9f9f9 0%, #ffffff 100%);
}

/* Language button */
.lang-btn {
    background: none; border: 1px solid #ddd; padding: 6px 12px;
    border-radius: 4px; cursor: pointer; font-size: 0.85rem;
    font-weight: 700; color: var(--text-main); font-family: inherit;
    /* Large enough touch target on mobile */
    min-height: 36px;
}

/* =============================================
   RESPONSIVE — Tablet
   ============================================= */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* =============================================
   RESPONSIVE — Mobile
   ============================================= */
@media (max-width: 768px) {

    /* Layout */
    .grid-2 { grid-template-columns: 1fr; gap: 24px; }
    .grid-4 { grid-template-columns: 1fr; }
    .section { padding: 60px 0; }
    .page-hero { padding-top: 110px; padding-bottom: 50px; }

    /* Navigation */
    .nav-links { display: none; }
    .mobile-toggle { display: block; }

    /* Trust stats — stays 2 columns */
    .grid-stats { grid-template-columns: repeat(2, 1fr) !important; }

    /* Product card images — full width, no crop */
    .product-card img {
        height: auto !important;
        aspect-ratio: 3 / 2;
        width: 100%;
        object-fit: contain;
        background-color: var(--surface-color);
    }

    /* Installation images and videos */
    .grid-4 .card img,
    .grid-4 .card video {
        height: auto !important;
        aspect-ratio: 16 / 9;
        width: 100%;
        object-fit: cover;
    }

    /* Buttons — natural width, only form buttons full width */
    .btn { padding: 14px 24px; }
    form .btn,
    .btn[style*="width:100%"] { width: 100%; }

    /* CTA section padding */
    section.section.container[style*="padding:120px"] {
        padding: 60px 24px !important;
    }

    /* Problem/solution articles */
    .section.container > .grid-2 > article {
        padding: 24px !important;
    }

    /* Footer */
    footer .container {
        flex-direction: column;
        align-items: flex-start !important;
    }
}

/* =============================================
   PERFORMANCE: Reduce motion for accessibility
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .card, .product-card, .btn { transition: none; will-change: auto; }
    .card:hover, .product-card:hover { transform: none; }
}
}

@media (max-width: 768px) {
    .hero-section img {
        object-position: left center;
    }
}