/* ===== CUSTOM STYLES FOR 光農会 WEBSITE ===== */

/* Color Variables */
:root {
    --color-dark-green: #1b4332;
    --color-green: #2d6a4f;
    --color-light-green: #d8f3dc;
    --color-yellow: #ffd60a;
    --color-white: #ffffff;
    --color-gray-dark: #374151;
    --color-gray-light: #f3f4f6;
}

/* Global Styles */
html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-white);
    color: var(--color-gray-dark);
}

/* ===== HERO SECTION - PARALLAX EFFECT ===== */
.hero-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

@media (max-width: 768px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}

/* Hero Content Animation */
.hero-section h1 {
    animation: fadeInUp 1s ease-out;
}

.hero-section p {
    animation: fadeInUp 1.2s ease-out;
}

.hero-section img {
    animation: fadeInDown 1s ease-out;
}

.hero-section a {
    animation: fadeInUp 1.4s ease-out;
}

/* ===== ANIMATIONS ===== */

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Down Animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Scale Animation on Hover */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.product-card img {
    transition: transform 0.3s ease;
}

.product-card:hover img {
    transform: scale(1.05);
}

/* ===== BUTTON STYLES ===== */

button, a[class*="bg-yellow"], a[class*="bg-green"] {
    transition: all 0.3s ease;
}

a[class*="bg-yellow"]:hover {
    box-shadow: 0 8px 20px rgba(255, 214, 10, 0.4);
}

a[class*="bg-green-900"]:hover {
    box-shadow: 0 8px 20px rgba(27, 67, 50, 0.3);
}

/* ===== SECTION STYLES ===== */

section {
    position: relative;
}

section h2 {
    position: relative;
    animation: fadeInUp 0.8s ease-out;
}

/* Divider Line Animation */
.h-1 {
    animation: expandWidth 0.8s ease-out;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 6rem;
    }
}

/* ===== CARD STYLES ===== */

.bg-green-50 {
    transition: all 0.3s ease;
}

.bg-green-50:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(45, 106, 79, 0.1);
}

/* ===== FORM STYLES ===== */

input, select, textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px rgba(45, 106, 79, 0.1);
}

/* ===== HEADER STYLES ===== */

header {
    transition: box-shadow 0.3s ease;
}

header nav a {
    position: relative;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-green);
    transition: width 0.3s ease;
}

header nav a:hover::after {
    width: 100%;
}

/* ===== RESPONSIVE STYLES ===== */

@media (max-width: 768px) {
    .hero-section {
        height: auto;
        padding: 60px 0;
    }


    .hero-section p {
        font-size: 1rem;
        line-height: 1.6;
    }

    section h2 {
        font-size: 2rem;
    }
}

/* ===== ACCESSIBILITY ===== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== UTILITY CLASSES ===== */

/* Smooth Transitions */
.smooth-transition {
    transition: all 0.3s ease;
}

/* Text Shadow for Better Readability */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-dark-green), var(--color-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== LOADING & INTERACTIVE STATES ===== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.active {
    font-weight: 700;
    color: var(--color-green);
}

/* ===== SCROLLBAR STYLING ===== */

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-light);
}

::-webkit-scrollbar-thumb {
    background: var(--color-green);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-dark-green);
}

/* ===== PRINT STYLES ===== */

@media print {
    header, footer {
        display: none;
    }

    body {
        background-color: white;
    }
}
