/*
Theme Name: OpenGrow Theme
Theme URI: https://opengrow.pt
Author: João David da Silva Pereira
Author URI: https://opengrow.pt
Description: Tema personalizado OpenGrow para WordPress, convertido do site institucional HTML/CSS/JS/PHP.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: opengrow
*/

/* ========== GLOBAL RESET & VARIABLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}
.logo-link:hover { transform: scale(1.02); }

body {
    font-family: 'Inter', sans-serif;
    background:
        repeating-linear-gradient(45deg, rgba(0,0,0,0.02) 0px, rgba(0,0,0,0.02) 2px, transparent 2px, transparent 8px),
        radial-gradient(at 50% 50%, var(--bg-hero-start) 0%, var(--bg-hero-end) 70%);
    background-blend-mode: normal;
    background-attachment: fixed;
    background-color: var(--bg-hero-end);
    color: var(--text-primary);
    line-height: 1.5;
    scroll-behavior: smooth;
    transition: background 0.4s ease, color 0.4s ease;
}

html { overflow-x: hidden; }

/* ========== DARK MODE (DEFAULT) ========== */
:root {
    --bg-hero-start: #4e5f36;
    --bg-hero-end: #201b1b;
    --bg-primary: #19221c;
    --bg-secondary: #132a19;
    --bg-card: rgba(20, 28, 18, 0.8);
    --bg-card-hover: rgba(28, 40, 24, 0.95);
    --text-primary: #ece9e0;
    --text-secondary: #ffffff;
    --text-muted: #bdd9ae;
    --accent: #7cb342;
    --accent-light: #b5d98c;
    --border-color: rgba(124, 179, 66, 0.3);
    --card-border: rgba(124, 179, 66, 0.2);
    --header-bg: rgba(37, 65, 28, 0.95);
    --header-border: rgba(124, 179, 66, 0.3);
    --header-bg-scrolled: rgba(6, 12, 8, 0.96);
    --footer-bg: #030604;
    --soft-bg: rgba(124, 179, 66, 0.1);
    --award-bg: rgba(124, 179, 66, 0.15);
    --partner-bg: #ffffff;
    --about-bg: rgba(124, 179, 66, 0.1);
    --dropdown-bg: rgba(18, 25, 18, 0.98);
    --dropdown-hover: #2a3a22;
}

/* ========== LIGHT MODE ========== */
html.light-mode-early,
html.light-mode {
    --bg-hero-start: #87d478;
    --bg-hero-end: #a7d478;
    --bg-primary: #f5f9ef;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fdf2;
    --text-primary: #1a2a1a;
    --text-secondary: #2c3e2a;
    --text-muted: #4a6741;
    --accent: #6a9e3a;
    --accent-light: #8fcb51;
    --border-color: rgba(124, 179, 66, 0.5);
    --card-border: rgba(124, 179, 66, 0.35);
    --header-bg: rgb(76, 133, 72);
    --header-border: rgba(92, 148, 49, 0.4);
    --header-bg-scrolled: rgba(10, 70, 0, 0.98);
    --footer-bg: #030604;
    --soft-bg: rgba(124, 179, 66, 0.1);
    --award-bg: rgba(255, 255, 255, 0.852);
    --partner-bg: #ffffff;
    --about-bg: rgba(124, 179, 66, 0.08);
    --dropdown-bg: rgba(245, 249, 239, 0.98);
    --dropdown-hover: #e2f0d9;
}

/* ========== HEADER ========== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--header-bg) 0%, var(--header-bg) 50%, rgba(139,195,74,0.15) 100%);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--header-border);
    padding: 0.8rem 2rem;
    transition: background 0.3s ease;
}
.main-header.scrolled { background: var(--header-bg-scrolled); }

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-icon img { max-width: 180px; height: auto; display: block; }

/* ========== NAV & DROPDOWNS ========== */
.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    position: relative;
}
.main-nav a { color: #d4e6c6; text-decoration: none; font-weight: 500; transition: color 0.2s; }
.main-nav a:hover { color: var(--accent-light); }

.dropdown-trigger {
    background: none; border: none;
    color: #d4e6c6; font-weight: 500; font-size: 1rem;
    font-family: 'Inter', sans-serif; cursor: pointer; padding: 0;
    transition: color 0.2s;
}
.dropdown-trigger:hover { color: var(--accent-light); }

.dropdown-nav { position: relative; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    min-width: 260px;
    background: var(--dropdown-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 0.8rem 0;
    display: flex; flex-direction: column; gap: 0.2rem;
    z-index: 200;
    box-shadow: 0 20px 40px -12px rgba(0,0,0,0.7);
    opacity: 0; visibility: hidden; pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
}
.dropdown-menu.show { opacity: 1; visibility: visible; pointer-events: all; transform: translateY(0); }
.dropdown-menu::before {
    content: ''; position: absolute; top: -20px; left: 0; width: 100%; height: 20px; background: transparent;
}

.product-dropdown-btn {
    background: transparent; border: none; text-align: left;
    padding: 0.8rem 1.5rem; font-size: 0.95rem; font-weight: 600;
    font-family: 'Inter', sans-serif; color: var(--text-primary);
    cursor: pointer; transition: all 0.25s ease;
    display: flex; align-items: center; gap: 12px;
    width: calc(100% - 1rem); margin: 0 0.5rem; border-radius: 8px;
}
.product-dropdown-btn i { width: 24px; color: var(--accent); font-size: 1.1rem; }
.product-dropdown-btn:hover {
    background: var(--dropdown-hover); padding-left: 2rem;
    color: var(--accent-light); transform: translateX(5px);
}

/* ========== HEADER BUTTONS ========== */
.header-buttons { display: flex; gap: 1rem; align-items: center; flex-shrink: 0; }

.btn-small {
    padding: 0.5rem 1.2rem; border-radius: 40px; text-decoration: none;
    font-weight: 600; font-size: 0.85rem; transition: all 0.2s;
    cursor: pointer; border: none; background: none;
    display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap;
}
.btn-primary-header { background: #7cb342; color: #0a1f0a; }
.btn-primary-header:hover { background: #8fcb51; transform: scale(1.02); }
.btn-secondary-header { background: rgba(0,0,0,0.5); border: 1px solid #b5d98c; color: #eaffdd; }
.btn-secondary-header:hover { background: #2d3e24; }

.btn-account-header {
    background: rgba(124,179,66,0.15); border: 1px solid var(--border-color);
    color: #d4e6c6; display: inline-flex; align-items: center; gap: 0.45rem;
    padding: 0.45rem 1rem; border-radius: 40px; font-size: 0.85rem; font-weight: 600;
    text-decoration: none; cursor: pointer; transition: all 0.2s ease; white-space: nowrap;
}
.btn-account-header:hover { background: rgba(124,179,66,0.3); border-color: var(--accent-light); color: #eaffdd; }

/* Account dropdown */
.account-dropdown-nav { position: relative; }
.account-dropdown-menu {
    position: absolute; top: 100%; right: 0; padding-top: 10px;
    min-width: 180px; opacity: 0; pointer-events: none;
    transform: translateY(-4px); transition: opacity 0.2s ease, transform 0.2s ease; z-index: 200;
}
.account-dropdown-menu.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.account-dropdown-menu-inner {
    background: var(--dropdown-bg); border: 1px solid var(--border-color);
    border-radius: 14px; padding: 0.5rem; box-shadow: 0 8px 32px rgba(0,0,0,0.35); position: relative;
}
.account-dropdown-btn {
    display: flex; align-items: center; gap: 0.65rem;
    width: 100%; padding: 0.65rem 1rem; background: transparent; border: none;
    border-radius: 10px; color: var(--text-primary); font-size: 0.875rem; font-weight: 500;
    font-family: inherit; text-decoration: none; cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease; white-space: nowrap;
}
.account-dropdown-btn:hover { background: var(--dropdown-hover); color: var(--accent-light); }
.account-logout-btn:hover { background: rgba(220,53,69,0.15); color: #dc3545; }

/* ========== HERO ========== */
.hero-main {
    position: relative; height: 100vh; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.hero-video-wrapper { position: absolute; inset: 0; z-index: 0; }
.hero-video { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
}
.hero-content { position: relative; z-index: 2; text-align: center; color: #fff; padding: 2rem; }
.hero-content h1 { font-size: clamp(3rem, 8vw, 7rem); font-weight: 900; letter-spacing: -0.02em; }
.hero-description { font-size: 1.1rem; max-width: 650px; margin: 1rem auto; opacity: 0.9; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; margin-top: 2rem; flex-wrap: wrap; }

.video-control-btn {
    position: absolute; bottom: 2rem; right: 2rem; z-index: 3;
    background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.3);
    color: #fff; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.video-control-btn:hover { background: rgba(0,0,0,0.8); }

/* ========== BUTTONS ========== */
.btn-primary {
    background: var(--accent); color: #0a1f0a; padding: 0.85rem 2rem;
    border-radius: 50px; font-weight: 700; text-decoration: none; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-primary:hover { background: var(--accent-light); transform: scale(1.03); }
.btn-secondary {
    background: transparent; border: 2px solid var(--accent-light);
    color: var(--accent-light); padding: 0.85rem 2rem; border-radius: 50px;
    font-weight: 700; text-decoration: none; transition: all 0.2s;
    display: inline-flex; align-items: center; gap: 0.5rem;
}
.btn-secondary:hover { background: var(--accent); color: #0a1f0a; border-color: var(--accent); }

/* ========== SECTION COMUM ========== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: 2.5rem; color: var(--text-primary); margin-bottom: 1rem; }
.section-header p { color: var(--text-muted); font-size: 1.1rem; }

/* ========== HORIZONTAL CARDS (PRODUTOS) ========== */
.horizontal-cards-section { padding: 5rem 0; }
.horizontal-cards-list { display: flex; flex-direction: column; gap: 2rem; }
.horizontal-card {
    display: flex; align-items: center; gap: 2rem;
    background: var(--bg-card); border: 1px solid var(--card-border);
    border-radius: 20px; padding: 2rem; cursor: pointer;
    transition: all 0.3s ease; text-decoration: none;
}
.horizontal-card:hover { background: var(--bg-card-hover); transform: translateX(8px); border-color: var(--accent); }
.card-img { width: 120px; flex-shrink: 0; }
.card-img img { width: 100%; border-radius: 12px; }
.card-separator { width: 2px; height: 80px; background: var(--border-color); flex-shrink: 0; }
.card-body h3 { color: var(--accent-light); font-size: 1.3rem; margin-bottom: 0.5rem; }
.card-body p { color: var(--text-muted); font-size: 0.95rem; }

/* ========== AWARDS ========== */
.awards-section { padding: 4rem 0; }
.awards-carousel-wrapper { position: relative; overflow: hidden; }
.award-track { display: flex; gap: 1.5rem; transition: transform 0.4s ease; }
.award-badge {
    background: var(--award-bg); border: 1px solid var(--border-color);
    border-radius: 16px; padding: 1.5rem; min-width: 280px; flex-shrink: 0;
    color: var(--text-primary); font-size: 0.9rem;
}
.award-badge i { color: var(--accent); margin-right: 0.5rem; }
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: var(--bg-card); border: 1px solid var(--border-color);
    color: var(--accent); width: 44px; height: 44px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s; z-index: 10;
}
.carousel-btn:hover { background: var(--accent); color: #0a1f0a; }
.prev-btn { left: 0; }
.next-btn { right: 0; }

/* ========== PARCEIROS ========== */
.partner-carousel { overflow: hidden; padding: 2rem 0; }
.carousel-track { display: flex; gap: 2rem; animation: scroll-partners 30s linear infinite; }
@keyframes scroll-partners { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.carousel-item img { height: 50px; object-fit: contain; filter: grayscale(1); opacity: 0.7; transition: all 0.3s; }
.carousel-item img:hover { filter: grayscale(0); opacity: 1; }
.partner-cta { text-align: center; margin-top: 2rem; }
.partner-cta p { color: var(--text-muted); margin-bottom: 1rem; }

/* ========== ABOUT ========== */
.about-section { padding: 5rem 0; background: var(--about-bg); }
.about-flex { display: flex; gap: 4rem; align-items: center; flex-wrap: wrap; }
.about-text { flex: 1; min-width: 300px; }
.about-text h2 { font-size: 2.2rem; color: var(--text-primary); margin-bottom: 1.5rem; }
.about-text p { color: var(--text-muted); margin-bottom: 1rem; }
.about-buttons { margin-top: 2rem; }
.about-quote {
    flex: 1; min-width: 250px; text-align: center;
    border: 1px solid var(--border-color); border-radius: 20px;
    padding: 2rem; background: var(--bg-card);
}
.about-quote i { font-size: 2rem; color: var(--accent); margin-bottom: 1rem; display: block; }
.about-quote p { font-style: italic; color: var(--text-primary); font-size: 1.1rem; }

/* ========== FOOTER ========== */
.main-footer { background: var(--footer-bg); padding: 3rem 2rem 1rem; border-top: 1px solid var(--border-color); }
.footer-container { max-width: 1280px; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-col h3, .footer-col h4 { color: var(--accent-light); margin-bottom: 1rem; }
.footer-col a, .footer-col p { color: #ffffff; text-decoration: none; font-size: 0.9rem; display: block; margin: 0.4rem 0; }
.footer-col a:hover { color: var(--accent-light); }
.footer-image { max-width: 120px; opacity: 0.8; transition: opacity 0.2s; }
.footer-image:hover { opacity: 1; }
.social-icons { display: flex; gap: 1rem; font-size: 1.4rem; cursor: pointer; color: var(--accent-light); margin-top: 0.5rem; }
.social-icons i:hover { color: #fff; transform: scale(1.2); transition: all 0.2s; }
.footer-bottom { text-align: center; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.05); font-size: 0.8rem; color: rgba(255,255,255,0.4); }

/* ========== POPUP PROMOCIONAL ========== */
.popup-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.7); display: flex;
    align-items: center; justify-content: center;
}
.popup-container {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 20px; max-width: 480px; width: 90%; overflow: hidden; position: relative;
}
.popup-close {
    position: absolute; top: 1rem; right: 1rem; background: rgba(0,0,0,0.5);
    border: none; color: #fff; width: 32px; height: 32px; border-radius: 50%;
    cursor: pointer; font-size: 1.2rem; display: flex; align-items: center; justify-content: center;
}
.popup-banner-img { width: 100%; height: 200px; object-fit: cover; }
.popup-content { padding: 1.5rem; text-align: center; }
.popup-content h2 { color: var(--text-primary); margin-bottom: 0.5rem; }
.popup-content p { color: var(--text-muted); margin-bottom: 1.5rem; }
.popup-btn {
    background: var(--accent); color: #0a1f0a; border: none;
    padding: 0.85rem 2rem; border-radius: 50px; font-weight: 700;
    cursor: pointer; transition: all 0.2s; width: 100%;
}
.popup-btn:hover { background: var(--accent-light); }
.popup-checkbox { display: flex; align-items: center; gap: 0.5rem; justify-content: center; margin-top: 1rem; color: var(--text-muted); font-size: 0.85rem; cursor: pointer; }

/* ========== LANDPAGE ========== */
.og-landpage { min-height: 100vh; display: flex; align-items: center; padding: 6rem 1.5rem 2rem; }
.og-landpage .brand-message { text-align: center; margin-bottom: 3rem; }
.og-landpage .brand-logo { display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.og-landpage .brand-logo img { max-width: 280px; height: auto; }
.og-landpage .tagline { font-size: 1.1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3em; color: var(--accent); margin-bottom: 1.5rem; }
.og-landpage .subhead { font-size: 1.2rem; color: var(--text-muted); max-width: 700px; margin: 0 auto; }

.cta-bag-group { display: flex; justify-content: center; gap: 2rem; margin: 4rem 0; flex-wrap: wrap; }
.btn-seedbag {
    position: relative; background: linear-gradient(135deg, #b87a44, #8b5a2b);
    border: 2px solid #e6c394; border-radius: 25%; padding: 1.5rem 2rem;
    min-width: 300px; display: flex; align-items: center; gap: 1.2rem;
    text-decoration: none; transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
    box-shadow: 0 10px 25px rgba(0,0,0,0.5); cursor: pointer;
}
.btn-seedbag:hover { transform: translateY(-8px) scale(1.03); }
.bag-string { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); width: 35px; height: 12px; background: #5e3a1a; border-radius: 2px; }
.bag-icon { font-size: 2.2rem; color: #fef3d6; }
.bag-text { color: #fef3d6; font-weight: 700; font-size: 1.2rem; text-align: left; }
.bag-text small { display: block; font-weight: 400; font-size: 0.85rem; opacity: 0.85; margin-top: 0.3rem; }

html.light-mode .btn-seedbag { background: linear-gradient(135deg, #e0b07a, #b87a44); border-color: #c99e5e; }
html.light-mode .bag-text, html.light-mode .bag-icon { color: #2c2b1f; }

/* ========== THEME TOGGLE LANDPAGE ========== */
.theme-header { position: fixed; top: 1.5rem; right: 1.5rem; z-index: 100; }
.theme-toggle-btn {
    background: var(--bg-card); border: 1px solid var(--accent);
    color: var(--text-primary); padding: 0.6rem 1.2rem; border-radius: 1.5rem;
    cursor: pointer; backdrop-filter: blur(5px); font-weight: 600;
    display: flex; align-items: center; gap: 0.5rem; transition: all 0.3s ease;
}
.theme-toggle-btn:hover { background: var(--accent); color: #1f2a0e; }

/* ========== REVEAL ANIMATIONS ========== */
.reveal { opacity: 0; transform: translateY(30px); transition: all 0.8s ease-out; }
.reveal.active { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }

/* ========== NEWSLETTER ========== */
.newsletter-section { padding: 4rem 0; text-align: center; }
.newsletter-form { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.newsletter-form input[type="email"] {
    padding: 0.85rem 1.5rem; border-radius: 50px; border: 1px solid var(--border-color);
    background: var(--bg-card); color: var(--text-primary); font-size: 1rem; min-width: 280px;
}
.newsletter-form button { /* usa btn-primary */ }

/* ========== RESPONSIVE ========== */
@media (max-width: 860px) {
    .main-header { padding: 0.8rem 1rem; }
    .header-container { flex-direction: column; text-align: center; }
    .main-nav { gap: 1rem; margin: 0.5rem 0; }
    .hero-content h1 { font-size: 3rem; }
    .horizontal-card { flex-direction: column; }
    .about-flex { flex-direction: column; }
    .cta-bag-group { flex-direction: column; align-items: center; }
    .btn-seedbag { min-width: unset; width: 100%; max-width: 380px; }
}


/* ========== POLYLANG LANGUAGE SWITCHER ========== */
.lang-switcher { display: flex; gap: 0.4rem; align-items: center; }
.lang-switcher ul { display: flex; gap: 0.4rem; list-style: none; }
.lang-switcher li { display: flex; }
.lang-switcher a {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.4rem 0.7rem; border-radius: 20px;
    background: rgba(124,179,66,0.1); border: 1px solid var(--border-color);
    color: var(--text-muted); text-decoration: none;
    font-size: 0.78rem; font-weight: 700; text-transform: uppercase;
    transition: all 0.2s;
}
.lang-switcher a:hover { background: rgba(124,179,66,0.25); color: var(--accent-light); }
.lang-switcher li.lang-item-current a {
    background: var(--accent); color: #0a1f0a; border-color: var(--accent);
}
@media (max-width: 600px) {
    .lang-switcher { order: -1; }
}
