/* css/styles.css */

/* 1. IMPORTS & FONTS */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap');

/* 2. CSS VARIABLES (Theme Mapping from tailwind.config) */
:root {
    /* Brand Colors */
    --brand-50: #f0f9ff;
    --brand-100: #e0f2fe;
    --brand-500: #0ea5e9;
    --brand-600: #0284c7;
    --brand-700: #0369a1;
    --brand-900: #0c4a6e;
    
    /* Accent Colors */
    --accent-500: #f59e0b;
    --accent-600: #d97706;

    /* Slate Colors (Base) */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-900: #0f172a;
    --slate-950: #020617;

    /* Semantic */
    --color-text: var(--slate-900);
    --color-bg: var(--slate-50);
}

/* 3. BASE STYLES */
html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden; /* Prevent horizontal scroll from animations */
}

/* 4. UTILITY HELPERS & ANIMATIONS (Polyfill for Tailwind Plugins) */

/* Safe Area for Mobile */
.pb-safe {
    padding-bottom: env(safe-area-inset-bottom, 20px);
}

/* Custom Animation Classes used in React components */
@keyframes pulse-custom {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

.animate-pulse {
    animation: pulse-custom 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* animate-in logic (simulating tailwindcss-animate) */
.animate-in {
    animation-duration: 0.3s;
    animation-fill-mode: both;
    animation-timing-function: ease-out;
}

/* Keyframes for FAQ Accordion & Sticky CTA */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInFromTop2 {
    from { transform: translateY(-0.5rem); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInFromBottom5 {
    from { transform: translateY(1.25rem); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in {
    animation-name: fadeIn;
}

.slide-in-from-top-2 {
    animation-name: slideInFromTop2;
}

.slide-in-from-bottom-5 {
    animation-name: slideInFromBottom5;
}

/* 5. GDPR / COOKIE BANNER (Mandatory Requirement) */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(15, 23, 42, 0.98); /* Slate 900 */
    color: white;
    padding: 1.5rem 1rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
}

#cookie-banner.visible {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.cookie-text {
    font-size: 0.9rem;
    color: var(--slate-300);
    line-height: 1.5;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    width: 100%;
    justify-content: center;
}

.btn-cookie {
    padding: 0.625rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    width: 100%;
    max-width: 150px;
}

.btn-cookie-accept {
    background-color: var(--brand-600);
    color: white;
}

.btn-cookie-accept:hover {
    background-color: var(--brand-500);
}

.btn-cookie-reject {
    background-color: transparent;
    border: 1px solid var(--slate-600);
    color: var(--slate-300);
}

.btn-cookie-reject:hover {
    border-color: var(--slate-400);
    color: white;
}

/* Desktop layout for Cookie Banner */
@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        text-align: left;
        justify-content: space-between;
    }
    
    .cookie-buttons {
        width: auto;
    }
}

/* 6. COMPONENT SPECIFIC TWEAKS */

/* FAQ Accordion Transitions */
.faq-answer {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.3s ease-out;
}

.faq-answer.open {
    grid-template-rows: 1fr;
}

.faq-answer-inner {
    overflow: hidden;
}

/* Sticky Mobile CTA visibility fix */
#mobile-sticky-cta {
    transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

#mobile-sticky-cta.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}