/* ════════════════════════════════════════════════
   FAST DESIGNERS — Frontend Stylesheet
   Uses CSS variables from /api/themes/css.php
   ════════════════════════════════════════════════ */

/* ═══ RESET & BASE ═══ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body, 'Inter', sans-serif);
    color: var(--body_text, #333);
    background: var(--background, #fff);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link, #7c3aed); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--link_hover, #6d28d9); }
::selection { background: var(--primary, #7c3aed); color: #fff; }
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
    display: inline-block;
}

/* ═══ LAYOUT ═══ */
.container { max-width: 1140px; margin: 0 auto; padding: 0 32px; }
.section { padding: 96px 0; }
.section-alt { background: var(--card_bg, #f9fafb); }

/* ═══ TYPOGRAPHY ═══ */
h1, h2, h3, h4 { font-family: var(--font-heading, 'Inter', sans-serif); font-weight: 700; line-height: 1.1; }
h1 { font-size: var(--fs-h1, 36px); color: var(--h1_color, #1a1a2e); }
h2 { font-size: var(--fs-h2, 28px); color: var(--h2_color, #2d2d44); }
h3 { font-size: var(--fs-h3, 24px); color: var(--h3h4_color, #444466); }
h4 { font-size: var(--fs-h4, 20px); color: var(--h3h4_color, #444466); }
p { font-size: var(--fs-text, 16px); }

/* ═══ BUTTONS ═══ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; font-family: var(--font-heading); font-weight: 700;
    font-size: var(--fs-btn_medium, 15px); border: none; border-radius: 2px;
    cursor: pointer; transition: all 0.25s; text-transform: uppercase;
    letter-spacing: 0.08em; text-decoration: none;
}
.btn-primary { background: var(--primary, #7c3aed); color: var(--primary_text, #fff); }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn-secondary { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,0.3); }
.btn-secondary:hover { background: rgba(255,255,255,0.05); }
.btn-cta { background: var(--btn_cart_bg, #10b981); color: var(--btn_cart_text, #fff); }
.btn-cta:hover { filter: brightness(1.1); }
.btn-sm { padding: 8px 20px; font-size: var(--fs-btn_small, 13px); }
.btn-lg { padding: 16px 40px; font-size: var(--fs-btn_large, 17px); }

/* ═══ ALERT BAR ═══ */
.alert-bar {
    width: 100%; padding: 8px 0;
    background: var(--primary, #7c3aed);
    color: var(--primary_text, #fff);
    font-size: 11px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.15em;
    position: relative; z-index: 60;
}
.alert-bar .container { display: flex; justify-content: space-between; align-items: center; }
.alert-bar .countdown {
    background: var(--btn_cart_bg, #10b981); color: var(--btn_cart_text, #fff);
    padding: 3px 10px; border-radius: 2px; font-family: monospace; font-size: 13px;
}

/* ═══ HEADER ═══ */
.site-header { width: 100%; background: var(--header_bg, #1a1a2e); border-bottom: 1px solid rgba(255,255,255,0.05); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 32px; max-width: 1140px; margin: 0 auto; }

/* Header Left: Logo + Contact */
.header-left { display: flex; align-items: center; gap: 20px; }
.site-logo { font-family: var(--font-heading); font-size: 24px; font-weight: 900; color: #fff; letter-spacing: -0.05em; text-decoration: none; }
.header-contact { display: flex; align-items: center; gap: 12px; }
.header-contact .whatsapp-icon { width: 40px; height: 40px; fill: var(--btn_cart_bg, #10b981); transition: transform 0.2s; cursor: pointer; flex-shrink: 0; }
.header-contact .whatsapp-icon:hover { transform: scale(1.1); }
.contact-lines { display: flex; flex-direction: column; gap: 2px; }
.contact-lines a { color: rgba(255,255,255,0.85); font-size: 11px; font-weight: 600; transition: color 0.2s; }
.contact-lines a:hover { color: var(--btn_cart_bg, #10b981); }

/* Header Center: Social */
.header-social { display: flex; align-items: center; gap: 16px; }
.header-social a { display: flex; transition: transform 0.2s; }
.header-social a:hover { transform: scale(1.15); }
.header-social svg { width: 28px; height: 28px; }

/* Header Right: Utils + Account */
.header-utils { display: flex; align-items: center; gap: 16px; }
.font-toggle { display: flex; align-items: center; gap: 4px; color: rgba(255,255,255,0.7); cursor: pointer; }
.font-toggle:hover { color: #fff; }
.theme-toggle { color: rgba(255,255,255,0.7); cursor: pointer; font-size: 20px; }
.theme-toggle:hover { color: #fff; }
.lang-select {
    display: flex; align-items: center; gap: 6px;
    border-left: 1px solid rgba(255,255,255,0.1); padding-left: 16px;
}
.lang-select img { width: 18px; height: 13px; border-radius: 1px; }
.lang-select select {
    background: transparent; border: none; color: #fff;
    font-size: 10px; font-weight: 700; cursor: pointer; outline: none;
}
.lang-select select option { color: #333; }
.btn-account {
    background: var(--btn_cart_bg, #10b981); color: var(--btn_cart_text, #002617);
    padding: 8px 20px; border-radius: 2px; font-weight: 900;
    font-size: 10px; text-transform: uppercase; border: none; cursor: pointer;
    transition: filter 0.2s;
}
.btn-account:hover { filter: brightness(1.1); }

/* ═══ MAIN NAV ═══ */
.main-nav {
    width: 100%; position: sticky; top: 0; z-index: 50;
    background: rgba(26, 26, 46, 0.85); backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 0 32px; max-width: 1140px; margin: 0 auto; }
.nav-links { display: flex; align-items: center; gap: 40px; flex: 1; }
.nav-links a {
    color: rgba(255,255,255,0.6); font-size: var(--fs-menu, 14px); font-weight: 700;
    text-transform: uppercase; letter-spacing: -0.01em; padding: 20px 0;
    border-bottom: 2px solid transparent; transition: all 0.2s; text-decoration: none;
}
.nav-links a:hover, .nav-links a.active { color: var(--menu_active, #7c3aed); border-bottom-color: var(--menu_active, #7c3aed); }
.nav-cta { flex-shrink: 0; }

/* Hamburger */
.hamburger { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 8px; }
.mobile-menu { display: none; background: var(--header_bg, #1a1a2e); }
.mobile-menu a { display: block; padding: 14px 32px; color: rgba(255,255,255,0.7); font-weight: 600; font-size: 15px; border-bottom: 1px solid rgba(255,255,255,0.05); }
.mobile-menu a:hover { color: #fff; background: rgba(255,255,255,0.03); }
.mobile-menu.open { display: block; }

/* ═══ HERO ═══ */
.hero {
    position: relative; min-height: 700px; display: flex; align-items: center;
    overflow: hidden; background: var(--header_bg, #1a1a2e);
    padding: 80px 0;
}
.hero-content { position: relative; z-index: 2; }
.hero h1 { color: #fff; font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.03em; margin-bottom: 28px; line-height: 1.05; }
.hero h1 .highlight { color: var(--btn_cart_bg, #10b981); }
.hero p { color: rgba(255,255,255,0.7); font-size: 20px; line-height: 1.7; margin-bottom: 40px; }
.hero-actions {
    display: flex; gap: 16px; flex-wrap: nowrap; align-items: center;
}
.hero-actions .btn {
    flex-shrink: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: clamp(12px, 1.5vw, 16px);
}
/* Hero background overlays */
.hero-bg-overlay {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
    pointer-events: none;
}
.hero-bg-gradient-overlay {
    position: absolute; inset: 0; z-index: 0;
    pointer-events: none;
}
.hero-image { border-radius: 12px; overflow: hidden; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.hero-countdown {
    display: inline-flex; align-items: center; gap: 8px;
    margin-bottom: 20px;
    transition: border-color 0.4s ease;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 10px 16px;
    background: var(--cd-bg, rgba(255,255,255,0.1));
    position: relative;
    overflow: hidden;
}
.countdown-timer {
    display: inline-flex; align-items: center; gap: 6px;
    position: relative;
    z-index: 2;
}
.cd-digit {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cd-bg, rgba(0,0,0,0.3));
    color: var(--cd-color, #10b981);
    font-family: 'Inter', monospace;
    font-weight: 800;
    border-radius: 8px;
    border: 2px solid var(--cd-color, #10b981);
    min-width: 2.2em; text-align: center;
    padding: 8px 12px;
}
.cd-sep {
    color: var(--cd-color, #10b981);
    font-weight: 700;
    font-size: 1.2em;
    opacity: 0.5;
}
/* Countdown sizes — S = old L, M = bigger, L = biggest */
.cd-size-small .cd-digit { font-size: 32px; padding: 8px 14px; border-radius: 8px; }
.cd-size-small .cd-sep { font-size: 28px; }
.cd-size-medium .cd-digit { font-size: 48px; padding: 12px 20px; border-radius: 10px; min-width: 2em; }
.cd-size-medium .cd-sep { font-size: 40px; }
.cd-size-large .cd-digit { font-size: 64px; padding: 16px 28px; border-radius: 12px; min-width: 2em; }
.cd-size-large .cd-sep { font-size: 56px; }
/* Hero border transition for animation */
.hero {
    transition: border-color 0.5s ease;
}

/* Hero Grid: Classic — text left, image right */
.hero-grid-classic {
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}

/* Hero Grid: Center — text centered, image below */
.hero-grid-center {
    display: flex; flex-direction: column; align-items: center; text-align: center; gap: 48px;
}
.hero-content-center { max-width: 720px; }
.hero-grid-center .hero-actions { justify-content: center; }
.hero-grid-center .hero-image { max-width: 900px; width: 100%; max-height: 400px; }

/* Hero Grid: Mirror — image left, text right */
.hero-grid-mirror {
    display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
}

/* Hero Grid: Stack — text top, full-width image below */
.hero-grid-stack {
    display: flex; flex-direction: column; gap: 48px;
}
.hero-grid-stack .hero-content { max-width: 720px; }
.hero-grid-stack .hero-image { width: 100%; max-height: 450px; }

/* ═══ SERVICES GRID ═══ */
.services-header { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 64px; }
.services-header h2 { font-size: clamp(28px, 3.5vw, 40px); letter-spacing: -0.02em; line-height: 1.15; }
.services-header p { align-self: end; color: var(--body_text, #555); font-size: 18px; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.service-card {
    padding: 40px 32px; display: flex; flex-direction: column; justify-content: space-between;
    min-height: 320px; background: #fff; transition: all 0.5s;
}
.service-card .material-symbols-outlined { font-size: 40px; color: var(--primary, #7c3aed); margin-bottom: 32px; }
.service-card h3 { margin-bottom: 16px; transition: color 0.5s; }
.service-card p { color: var(--body_text, #555); font-size: 14px; line-height: 1.7; transition: color 0.5s; }
.service-card:hover { background: var(--header_bg, #1a1a2e); }
.service-card:hover .material-symbols-outlined, .service-card:hover h3 { color: #fff; }
.service-card:hover p { color: rgba(255,255,255,0.7); }

/* ═══ PORTFOLIO ═══ */
.portfolio-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 48px; }
.portfolio-header .badge { font-size: 10px; font-weight: 900; letter-spacing: 0.15em; text-transform: uppercase; color: var(--body_text, #777); }
.portfolio-header h2 { font-size: clamp(32px, 4vw, 48px); letter-spacing: -0.02em; margin-top: 8px; }
.portfolio-header a { font-size: 14px; font-weight: 700; border-bottom: 1px solid; padding-bottom: 4px; }
.portfolio-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; height: 700px; }
.portfolio-main { position: relative; overflow: hidden; }
.portfolio-main img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); transition: filter 0.7s; }
.portfolio-main:hover img { filter: grayscale(0); }
.portfolio-main .gradient { position: absolute; inset: 0; background: linear-gradient(to top, var(--header_bg, #1a1a2e), transparent); opacity: 0.8; }
.portfolio-main .caption { position: absolute; bottom: 40px; left: 40px; color: #fff; z-index: 2; }
.portfolio-main .caption .cat { font-size: 12px; font-weight: 700; color: var(--btn_cart_bg, #10b981); text-transform: uppercase; margin-bottom: 8px; display: block; }
.portfolio-main .caption h3 { font-size: 30px; color: #fff; margin-bottom: 16px; }
.portfolio-main .caption p { color: rgba(255,255,255,0.7); max-width: 440px; }
.portfolio-sidebar { display: grid; grid-template-rows: 1fr 1fr; gap: 24px; }
.portfolio-card-dark { background: var(--header_bg, #1a1a2e); padding: 40px; position: relative; overflow: hidden; }
.portfolio-card-dark h3 { font-size: 20px; color: #fff; margin-bottom: 8px; }
.portfolio-card-dark p { color: rgba(255,255,255,0.6); font-size: 14px; }
.portfolio-card-dark .bg-icon { position: absolute; bottom: -10px; right: 10px; font-size: 120px; opacity: 0.08; color: #fff; }
.portfolio-card-stats { background: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: center; }
.portfolio-card-stats .number { font-size: 56px; font-weight: 900; color: var(--h1_color, #1a1a2e); margin-bottom: 8px; }
.portfolio-card-stats .label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--body_text, #777); }
.portfolio-card-stats hr { border: none; border-top: 1px solid var(--border, #e5e7eb); margin: 24px 0; }
.portfolio-card-stats .quote { font-style: italic; font-size: 14px; color: var(--body_text, #777); }

/* ═══ TESTIMONIALS ═══ */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; }
.testimonial { display: flex; flex-direction: column; gap: 20px; }
.testimonial:nth-child(2) { border-left: 1px solid var(--border, #e5e7eb); border-right: 1px solid var(--border, #e5e7eb); padding: 0 48px; }
.testimonial .stars { display: flex; gap: 2px; color: var(--stars, #f59e0b); }
.testimonial .stars .material-symbols-outlined { font-variation-settings: 'FILL' 1; }
.testimonial blockquote { font-style: italic; color: var(--body_text, #555); line-height: 1.7; }
.testimonial .author { display: flex; align-items: center; gap: 12px; }
.testimonial .author img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.testimonial .author .name { font-weight: 700; color: var(--h1_color, #1a1a2e); }
.testimonial .author .role { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--body_text, #777); }
.partner-logos { display: flex; justify-content: space-between; align-items: center; gap: 48px; flex-wrap: wrap; margin-top: 80px; opacity: 0.4; filter: grayscale(1); }
.partner-logos span { font-size: 22px; font-weight: 900; font-style: italic; }

/* ═══ BLOG PREVIEW ═══ */
.blog-header { text-align: center; margin-bottom: 64px; }
.blog-header h2 { font-size: clamp(28px, 3.5vw, 40px); letter-spacing: -0.02em; }
.blog-header .line { width: 64px; height: 3px; background: var(--primary, #7c3aed); margin: 24px auto 0; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.blog-card { cursor: pointer; }
.blog-card .thumb { overflow: hidden; height: 256px; margin-bottom: 24px; }
.blog-card .thumb img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; transition: transform 0.5s; }
.blog-card:hover .thumb img { transform: scale(1.05); }
.blog-card .meta { display: flex; align-items: center; gap: 12px; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; color: var(--body_text, #777); margin-bottom: 12px; }
.blog-card .meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--body_text, #999); }
.blog-card h3 { font-size: 20px; margin-bottom: 12px; transition: color 0.3s; line-height: 1.3; }
.blog-card:hover h3 { color: var(--primary, #7c3aed); }
.blog-card p { font-size: 14px; color: var(--body_text, #777); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ═══ FAQ ═══ */
.faq-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.faq-left h2 { font-size: clamp(28px, 3vw, 40px); letter-spacing: -0.02em; margin-bottom: 20px; }
.faq-left > p { color: var(--body_text, #555); margin-bottom: 32px; }
.faq-cta-box {
    background: var(--header_bg, #1a1a2e); padding: 48px; color: #fff;
}
.faq-cta-box h4 { font-size: 18px; color: #fff; margin-bottom: 16px; }
.faq-cta-box p { color: rgba(255,255,255,0.6); font-size: 14px; margin-bottom: 24px; }
.faq-items { display: flex; flex-direction: column; gap: 16px; }
.faq-item { background: #fff; padding: 24px; cursor: pointer; }
.faq-item.active { border-bottom: 2px solid var(--primary, #7c3aed); }
.faq-item .question { display: flex; justify-content: space-between; align-items: center; }
.faq-item .question h4 { font-weight: 700; font-size: 15px; }
.faq-item .answer { margin-top: 16px; font-size: 14px; color: var(--body_text, #555); line-height: 1.7; display: none; }
.faq-item.active .answer { display: block; }

/* ═══ NEWSLETTER ═══ */
.newsletter { background: var(--header_bg, #1a1a2e); color: #fff; text-align: center; }
.newsletter h2 { font-size: clamp(32px, 4vw, 48px); color: #fff; letter-spacing: -0.02em; margin-bottom: 32px; }
.newsletter p { color: rgba(255,255,255,0.6); font-size: 18px; max-width: 640px; margin: 0 auto 48px; }
.newsletter form { display: flex; gap: 8px; max-width: 540px; margin: 0 auto; }
.newsletter input[type="email"] {
    flex: 1; padding: 16px 24px; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.2); color: #fff; font-size: 15px; outline: none;
    border-radius: 2px;
}
.newsletter input[type="email"]::placeholder { color: rgba(255,255,255,0.4); }
.newsletter input[type="email"]:focus { border-color: var(--primary, #7c3aed); }
.newsletter .gdpr { margin-top: 24px; font-size: 10px; color: rgba(255,255,255,0.3); text-transform: uppercase; letter-spacing: 0.2em; }

/* ═══ FOOTER ═══ */
.site-footer { background: var(--footer_bg, #1a1a2e); padding: 96px 0 48px; border-top: 1px solid rgba(255,255,255,0.05); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 64px; }
.footer-brand .logo { font-family: var(--font-heading); font-size: 28px; font-weight: 900; color: #fff; letter-spacing: -0.05em; margin-bottom: 24px; }
.footer-brand p { color: var(--footer_text, #9ca3af); line-height: 1.7; margin-bottom: 24px; font-size: 14px; }
.footer-social { display: flex; gap: 12px; }
.footer-social a {
    width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center;
    color: var(--footer_text, #9ca3af); font-size: 12px; font-weight: 700; transition: all 0.2s;
}
.footer-social a:hover { background: var(--primary, #7c3aed); color: #fff; border-color: var(--primary, #7c3aed); }
.footer-col h4 { color: #fff; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 24px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 14px; }
.footer-col a { color: var(--footer_text, #9ca3af); font-size: 14px; transition: all 0.2s; }
.footer-col a:hover { color: var(--primary, #7c3aed); transform: translateX(4px); display: inline-block; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 32px; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { color: var(--footer_text, #9ca3af); font-size: 12px; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1024px) {
    .services-grid, .blog-grid, .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .portfolio-grid { grid-template-columns: 1fr; height: auto; }
    .portfolio-main { min-height: 400px; }
    .faq-layout { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .services-header { grid-template-columns: 1fr; }
    .testimonial:nth-child(2) { border: none; padding: 0; }
    .hero-grid-classic, .hero-grid-mirror { grid-template-columns: 1fr; }
    .hero-grid-classic .hero-image, .hero-grid-mirror .hero-image { max-height: 350px; }
}
@media (max-width: 768px) {
    .container { padding: 0 20px; }
    .section { padding: 60px 0; }
    .services-grid, .blog-grid { grid-template-columns: 1fr; }
    .testimonials-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero { min-height: 500px; padding: 48px 0; }
    .hero h1 { font-size: 36px; }
    .hero-actions { flex-direction: column; }
    .hero-grid-center .hero-image, .hero-grid-stack .hero-image { max-height: 250px; }
    .newsletter form { flex-direction: column; }
    /* Header mobile */
    .header-social, .header-utils .font-toggle, .header-utils .theme-toggle, .header-utils .lang-select { display: none; }
    .hamburger { display: block; }
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .mobile-menu .nav-cta-mobile { display: block; padding: 16px 32px; }
    .mobile-menu .nav-cta-mobile .btn { width: 100%; justify-content: center; }
    .partner-logos { justify-content: center; }
    .portfolio-sidebar { grid-template-rows: auto; }
}
