@tailwind base;
@tailwind components;
@tailwind utilities;

@import "kaminari_pagination";

/* Brand Design System - Scandinavian Simplicity */
@layer base {
    /* Custom CSS variables for brand colors */
    :root {
        --brand-green: #24cc28;
        --brand-green-light: #4fd952;
        --brand-green-dark: #1fa823;
        --brand-green-50: #f0fcf0;
        --brand-green-100: #dcf9dd;
        --brand-green-500: #24cc28;
    }

    /* Typography improvements for Scandinavian design */
    body {
        font-family:
            -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
            "Helvetica Neue", Arial, sans-serif;
        color: #171717;
        line-height: 1.6;
    }

    /* Enhanced form styling */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        background-color: #fafafa;
        border: 1px solid #e5e5e5;
        transition: all 0.2s ease;
    }

    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="password"]:focus,
    select:focus,
    textarea:focus {
        outline: none;
        border-color: var(--brand-green);
        background-color: white;
        box-shadow: 0 0 0 3px rgba(36, 204, 40, 0.1);
    }

    /* Button base styles */
    button {
        transition: all 0.2s ease;
    }
}

@layer components {
    /* Brand button styles */
    .btn-brand {
        background-color: var(--brand-green);
        color: white;
        border: none;
        border-radius: 6px;
        padding: 0.75rem 1.5rem;
        font-weight: 500;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .btn-brand:hover {
        background-color: var(--brand-green-dark);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(36, 204, 40, 0.25);
    }

    .btn-brand-outline {
        background-color: transparent;
        color: var(--brand-green);
        border: 1px solid var(--brand-green);
        border-radius: 6px;
        padding: 0.75rem 1.5rem;
        font-weight: 500;
        transition: all 0.2s ease;
        cursor: pointer;
    }

    .btn-brand-outline:hover {
        background-color: var(--brand-green);
        color: white;
    }

    /* Card styles for Scandinavian design */
    .card {
        background: white;
        border-radius: 12px;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
        transition: all 0.2s ease;
    }

    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    }

    /* Search bar styling */
    .search-container {
        background: white;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
        padding: 2rem;
    }

    /* Tag styling */
    .tag {
        background-color: var(--brand-green-50);
        color: var(--brand-green-dark);
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
        font-size: 0.875rem;
        font-weight: 500;
    }

    .tag-outline {
        background-color: white;
        color: #737373;
        border: 1px solid #e5e5e5;
        padding: 0.25rem 0.75rem;
        border-radius: 20px;
        font-size: 0.875rem;
        transition: all 0.2s ease;
    }

    .tag-outline:hover {
        border-color: var(--brand-green);
        color: var(--brand-green-dark);
    }

    /* Header navigation improvements */
    .nav-link {
        color: #171717;
        text-decoration: none;
        font-weight: 500;
        transition: color 0.2s ease;
    }

    .nav-link:hover {
        color: var(--brand-green);
    }

    .nav-link-brand {
        color: var(--brand-green);
        text-decoration: none;
        font-weight: 600;
    }

    /* Flash message styling */
    .flash-message {
        background-color: var(--brand-green-50);
        color: var(--brand-green-dark);
        border: 1px solid var(--brand-green-100);
        border-radius: 8px;
        padding: 1rem;
        margin: 1rem auto;
        max-width: 500px;
        text-align: center;
        font-weight: 500;
    }

    /* Social media links */
    .social-link {
        color: #525252;
        text-decoration: none;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        gap: 0.5rem;
        font-weight: 500;
    }

    .social-link:hover {
        color: var(--brand-green);
        transform: translateX(2px);
    }

    .social-icon {
        font-size: 1.1rem;
        transition: transform 0.2s ease;
    }

    .social-link:hover .social-icon {
        transform: scale(1.1);
    }

    /* Enhanced form interactions */
    .js-enhanced-focus input:focus,
    .js-enhanced-focus select:focus,
    .js-enhanced-focus textarea:focus {
        border-color: var(--brand-green) !important;
        background-color: white !important;
        box-shadow: 0 0 0 3px rgba(36, 204, 40, 0.1) !important;
    }
}

@layer utilities {
    /* Utility classes for consistent spacing */
    .content-wrapper {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 2rem;
    }

    .section-padding {
        padding: 4rem 0;
    }

    .section-padding-lg {
        padding: 6rem 0;
    }

    /* Brand color utilities */
    .text-brand-green {
        color: var(--brand-green);
    }

    .bg-brand-green {
        background-color: var(--brand-green);
    }

    .border-brand-green {
        border-color: var(--brand-green);
    }

    /* Animation utilities */
    .animate-lift {
        transition:
            transform 0.2s ease,
            box-shadow 0.2s ease;
    }

    .animate-lift:hover {
        transform: translateY(-2px);
    }

    /* Parallax banner styles */
    .parallax-banner {
        height: 60vh;
        min-height: 400px;
        background-image: url("/banner-2560x1440.jpg");
        background-size: cover;
        background-attachment: fixed;
        background-position: center;
        background-repeat: no-repeat;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        overflow: hidden;
    }

    .parallax-content {
        text-align: center;
        z-index: 2;
        max-width: 800px;
        padding: 2rem;
    }

    .parallax-title {
        font-size: clamp(3rem, 8vw, 6rem);
        font-weight: 700;
        line-height: 1.1;
        margin-bottom: 1rem;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }

    .parallax-subtitle {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
        color: white;
        font-weight: 300;
        font-style: italic;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    }

    /* Parallax animations */
    /* Parallax overlay for better contrast */
    .parallax-overlay {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.2);
        z-index: 1;
    }

    @keyframes bounce {
        0%,
        20%,
        50%,
        80%,
        100% {
            transform: translateX(-50%) translateY(0);
        }
        40% {
            transform: translateX(-50%) translateY(-10px);
        }
        60% {
            transform: translateX(-50%) translateY(-5px);
        }
    }

    /* Mobile responsiveness for parallax */
    @media (max-width: 768px) {
        .parallax-banner {
            background-attachment: scroll !important;
            height: 50vh;
            min-height: 300px;
        }

        .parallax-title {
            font-size: clamp(2rem, 6vw, 4rem) !important;
        }
    }
}
