/* =====================================================
   OLIVABOT WEBSITE - MINIMAL RESPONSIVE CSS
   Mobile-first, Fast loading, Best practices
   ===================================================== */

/* ─────────────────────────────────────────
   Tokens
───────────────────────────────────────── */
:root {
    --bg: #ffffff;
    --fg: #111111;
    --muted: #555555;
    --border: #e0e0e0;
    --accent: #2e7d32;
    --accent-fg: #ffffff;
    --nav-bg: #ffffff;
    --footer-bg: #f7f7f7;
    --max-w: 960px;
    --radius: 8px;
    --text: #666;
    --link: #2563eb;
}

[data-theme="dark"] {
    --bg: #0e0e0e;
    --fg: #f0f0f0;
    --muted: #999999;
    --border: #2a2a2a;
    --accent: #66bb6a;
    --accent-fg: #000000;
    --nav-bg: #0e0e0e;
    --footer-bg: #0e0e0e;
    --text: #999;
}

/* ─────────────────────────────────────────
   Reset
───────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
    background: var(--bg);
    color: var(--fg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ─────────────────────────────────────────
   Typography
───────────────────────────────────────── */
h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.25rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    margin: 2rem 0 1rem;
}

h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

p {
    line-height: 1.6;
    margin-bottom: 1.2rem;
    max-width: 65ch;
    color: var(--muted);
}

.intro {
    font-size: 1.125rem;
    color: var(--fg);
}

.highlight {
    font-weight: 600;
}

/* ─────────────────────────────────────────
   Layout
───────────────────────────────────────── */
main {
    flex: 1;
    max-width: var(--max-w);
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

/* ─────────────────────────────────────────
   Breadcrumb Navigation
───────────────────────────────────────── */
.breadcrumb {
    padding: 0 0 1.5rem;
    color: var(--text);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--link);
    text-decoration: none;
}

.breadcrumb a:after {
    content: " -";
    margin: 0 0.5rem;
}

.breadcrumb a:last-child:after,
.breadcrumb span:after {
    content: "";
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────
   Buttons
───────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: var(--accent-fg);
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.2s, background 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: transparent;
    color: var(--fg);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.cta-button {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    background: var(--accent);
    color: var(--accent-fg);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: opacity 0.2s;
}

.cta-button:hover {
    opacity: 0.9;
}

/* ─────────────────────────────────────────
   Cards
───────────────────────────────────────── */
.service-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: box-shadow 0.2s, border-color 0.2s;
    margin-bottom: 1rem;
}

.service-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.service-card h3 {
    margin-bottom: 0.5rem;
    color: var(--fg);
}

.service-card p {
    color: var(--muted);
    font-size: 0.95rem;
}

.service-card a {
    display: inline-block;
    margin-top: 1rem;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.service-card a:hover {
    text-decoration: underline;
}

/* ─────────────────────────────────────────
   Gallery
───────────────────────────────────────── */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-caption {
    font-size: 0.875rem;
    color: var(--muted);
    text-align: center;
    margin-top: 0.5rem;
}

/* ─────────────────────────────────────────
   Features List
───────────────────────────────────────── */
.features {
    list-style: none;
    padding-left: 0;
}

.features li {
    padding: 0.5rem 0;
    padding-left: 1.75rem;
    position: relative;
}

.features li:before {
    content: "\2713";
    color: #10b981;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* ─────────────────────────────────────────
   Services Grid
───────────────────────────────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* ─────────────────────────────────────────
   FAQ
───────────────────────────────────────── */
.faq-item {
    margin-bottom: 1.5rem;
}

.faq-question {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--fg);
}

.faq-answer {
    color: var(--muted);
}

/* ─────────────────────────────────────────
   CTA Section
───────────────────────────────────────── */
.cta-section {
    text-align: center;
    margin: 3rem 0;
}

/* ─────────────────────────────────────────
   Nav
───────────────────────────────────────── */
header {
    background: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--fg);
    text-decoration: none;
    margin-right: auto;
}

.nav-brand__logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.nav-links a {
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.15s;
}

.nav-links a:hover {
    color: var(--fg);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--fg);
}

.nav-toggle svg {
    display: block;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

/* Theme toggle */
.theme-btn {
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 6px;
    color: var(--fg);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
}

.theme-btn svg {
    width: 20px;
    height: 20px;
    display: block;
}

.theme-btn:hover {
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.theme-btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-btn--footer {
    border-radius: 50%;
    width: 36px;
    height: 36px;
    padding: 0;
}

/* Language dropdown */
.lang-dropdown {
    position: relative;
}

.lang-dropdown__toggle {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    background: none;
    border: 1px solid var(--border, color-mix(in srgb, var(--fg) 15%, transparent));
    border-radius: 6px;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--fg);
    line-height: 1;
    transition: border-color 0.15s, background 0.15s;
}

.lang-dropdown__toggle:hover {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.lang-dropdown__toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.lang-dropdown__flag {
    width: 20px;
    height: 14px;
    border-radius: 2px;
    object-fit: cover;
    vertical-align: middle;
}

.lang-dropdown__label {
    letter-spacing: 0.03em;
}

.lang-dropdown__chevron {
    transition: transform 0.2s;
}

.lang-dropdown.open .lang-dropdown__chevron {
    transform: rotate(180deg);
}

.lang-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 1000;
    min-width: 160px;
    margin: 0;
    padding: 6px 0;
    list-style: none;
    background: var(--bg);
    border: 1px solid var(--border, color-mix(in srgb, var(--fg) 15%, transparent));
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.lang-dropdown.open .lang-dropdown__menu {
    display: block;
}

.lang-dropdown--footer .lang-dropdown__menu {
    top: auto;
    bottom: calc(100% + 6px);
}

.lang-dropdown__menu a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 8px 14px;
    font-size: 0.85rem;
    color: var(--fg);
    text-decoration: none;
    transition: background 0.12s;
}

.lang-dropdown__menu a:hover {
    background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.lang-dropdown__menu a[aria-current="true"] {
    font-weight: 700;
    color: var(--accent);
}

.lang-dropdown__menu a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: -2px;
    border-radius: 4px;
}

@media (max-width: 680px) {
    .nav-toggle {
        display: flex;
    }

    .nav-controls {
        order: -1;
        margin-left: auto;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 56px;
        left: 0;
        right: 0;
        background: var(--nav-bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 1rem 1.5rem;
        gap: 0.75rem;
    }

    .nav-links.open {
        display: flex;
    }
}

/* ─────────────────────────────────────────
   Footer
───────────────────────────────────────── */
footer {
    background: var(--footer-bg);
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 0.85rem;
    padding: 2.5rem 1.5rem 2rem;
}

.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--fg);
    text-decoration: none;
    flex-shrink: 0;
}

.footer-brand:hover {
    color: var(--accent);
    text-decoration: none;
}

.footer-brand__logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
}

.footer-nav a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-nav a:hover {
    color: var(--fg);
}

.footer-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.footer-meta {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.8rem;
}

.footer-meta a {
    color: var(--muted);
}

.footer-meta a:hover {
    color: var(--accent);
}

.footer-email {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--fg) !important;
    margin-bottom: 0.4rem;
}

.footer-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
    flex-shrink: 0;
}

.footer-legal {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    justify-content: flex-end;
}

.footer-legal a {
    color: var(--muted);
    text-decoration: none;
}

.footer-legal a:hover {
    color: var(--fg);
}

.footer-controls {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

@media (max-width: 600px) {
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-right {
        align-items: flex-start;
    }

    .footer-legal {
        justify-content: flex-start;
    }
}

/* ─────────────────────────────────────────
   Cookie Banner
───────────────────────────────────────── */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background: var(--nav-bg);
    border-top: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    font-size: 0.875rem;
    animation: slide-up 0.2s ease;
}

@keyframes slide-up {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-banner[hidden] {
    display: none;
}

.cookie-banner__text {
    color: var(--muted);
}

.cookie-banner__text a {
    color: var(--accent);
}

.cookie-banner__actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.cookie-banner__btn {
    padding: 0.4rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    cursor: pointer;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--fg);
}

.cookie-banner__btn--primary {
    background: var(--accent);
    color: var(--accent-fg);
    border-color: var(--accent);
}

.cookie-banner__btn--primary:hover {
    opacity: 0.9;
}

.cookie-banner__btn--secondary:hover {
    background: var(--border);
}

@media (max-width: 600px) {
    .cookie-banner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ─────────────────────────────────────────
   Responsive Adjustments
───────────────────────────────────────── */
@media (min-width: 768px) {
    main {
        padding: 3rem 1.5rem 4rem;
    }

    .gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ─────────────────────────────────────────
   Print Styles
───────────────────────────────────────── */
@media print {
    .nav-toggle,
    .nav-links,
    .nav-controls,
    .cookie-banner,
    .footer-controls {
        display: none;
    }

    body {
        display: block;
        min-height: auto;
    }

    main {
        padding: 1rem;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}
