/* Global Variables */
:root {
    --color-primary: #8A9A5B;
    /* Sage Green */
    --color-secondary: #F4C2C2;
    /* Soft Pink */
    --color-bg: #FAFAFA;
    /* Off-white */
    --color-text: #333333;
    /* Charcoal */
    --color-text-light: #666666;
    --color-white: #ffffff;

    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    --border-radius: 8px;
    --transition: 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
}

/* Typography Helpers */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-xs);
}

.section-desc {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    font-family: var(--font-body);
    font-weight: 500;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #72824C;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-outline {
    border: 1px solid var(--color-text);
    color: var(--color-text);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    background-color: var(--color-primary);
    color: white;
    border: none;
}

/* Navbar */
.navbar {
    padding: var(--spacing-md) 0;
    background-color: var(--color-bg);
    /* Or transparent if sticky */
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
}

.nav-link {
    font-size: 0.95rem;
    color: var(--color-text);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--color-primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--color-text);
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    height: 80vh;
    min-height: 500px;
    background-color: #f0ebe6;
    /* Fallback */
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/hero.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    color: white;
    /* Ensure text is visible on image */
}

.hero-content {
    z-index: 2;
    max-width: 600px;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
    color: var(--color-white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-md);
    max-width: 80%;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
}

/* Services */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.card {
    padding: var(--spacing-md);
    background: var(--color-white);
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
}

.service-card .icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.service-card h3 {
    margin-bottom: var(--spacing-xs);
    font-size: 1.25rem;
}

/* Featured Products */
.product-card {
    transition: var(--transition);
}

.product-image {
    height: 350px;
    background-color: #e0e0e0;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-sm);
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--color-white);
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: 500;
}

.product-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
}

.product-info .price {
    font-weight: 500;
    color: var(--color-primary);
}

.center-btn {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.about-text h2 {
    margin-bottom: var(--spacing-md);
}

.about-text p {
    margin-bottom: var(--spacing-sm);
    color: var(--color-text-light);
}

.about-image {
    height: 400px;
    background-color: #d1d1d1;
    border-radius: var(--border-radius);
    overflow: hidden;
}

/* Map Section */
.map-container {
    width: 100%;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Footer */
.footer {
    background-color: #2a2a2a;
    color: var(--color-white);
    padding-top: var(--spacing-xl);
    padding-bottom: var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-col h3,
.footer-col h4 {
    color: var(--color-white);
    margin-bottom: var(--spacing-sm);
}

.footer-col p,
.footer-col a {
    color: #a0a0a0;
    margin-bottom: 0.5rem;
    display: block;
    font-size: 0.9rem;
}

.footer-col a:hover {
    color: var(--color-primary);
}

.newsletter input {
    padding: 0.6rem;
    border-radius: 4px;
    border: none;
    width: 100%;
    margin-bottom: 0.5rem;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: var(--spacing-md);
    text-align: center;
    color: #666;
    font-size: 0.85rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        /* Full screen menu */
        height: 100vh;
        flex-direction: column;
        justify-content: center;
        background-color: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
        backdrop-filter: blur(10px);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        font-size: 1.5rem;
        margin: 1rem 0;
        display: block;
    }

    .hero {
        min-height: 100vh;
        text-align: center;
        /* Mobile Background Animation */
        background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('images/hero.png');
        background-size: cover;
        background-position: center;
        background-attachment: scroll;
        animation: kenburns 20s ease-out infinite alternate;
    }

    @keyframes kenburns {
        0% {
            background-position: center;
            background-size: 100%;
        }

        100% {
            background-position: center;
            background-size: 110%;
        }
    }

    .hero-content {
        padding: 0 1.5rem;
    }

    .hero-title {
        font-size: 3rem;
        line-height: 1.2;
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        padding: 1rem;
        /* Larger touch target */
        font-size: 1.1rem;
    }

    /* Pulse animation for the main Call CTA */
    .hero-buttons .btn-primary {
        animation: pulse 2s infinite;
        box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    }

    @keyframes pulse {
        0% {
            transform: scale(0.95);
            box-shadow: 0 0 0 0 rgba(138, 154, 91, 0.7);
        }

        70% {
            transform: scale(1);
            box-shadow: 0 0 0 10px rgba(138, 154, 91, 0);
        }

        100% {
            transform: scale(0.95);
            box-shadow: 0 0 0 0 rgba(138, 154, 91, 0);
        }
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .about-image {
        height: 250px;
        order: -1;
        /* Image first */
    }

    .center-btn {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .center-btn .btn {
        margin: 0 !important;
        /* Override inline styles */
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        text-align: center;
    }

    .map-container iframe {
        height: 300px;
        /* Smaller map on mobile */
    }
}

/* Animations */
.hidden-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    animation: fadeInUp 1s ease-out forwards;
}

.hero-subtitle {
    animation: fadeInUp 1s ease-out 0.3s forwards;
    /* 0.3s delay */
    opacity: 0;
    /* Final state handled by forwards, initial by this */
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.6s forwards;
    /* 0.6s delay */
    opacity: 0;
}

/* Preloader */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loader-wrapper.loaded {
    opacity: 0;
    visibility: hidden;
}

.flower-loader {
    position: relative;
    width: 60px;
    height: 60px;
    animation: rotate 3s linear infinite;
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background-color: #ffd700;
    border-radius: 50%;
    z-index: 2;
}

.petal {
    position: absolute;
    width: 24px;
    height: 24px;
    background-color: var(--color-secondary);
    border-radius: 50% 50% 0 50%;
    top: 50%;
    left: 50%;
    transform-origin: 0% 0%;
    opacity: 0.9;
}

.petal:nth-child(1) {
    transform: rotate(0deg) translate(0, -50%) scale(1);
    animation: bloom 2s ease-in-out infinite alternate;
}

.petal:nth-child(2) {
    transform: rotate(90deg) translate(0, -50%) scale(1);
    animation: bloom 2s ease-in-out infinite alternate 0.2s;
}

.petal:nth-child(3) {
    transform: rotate(180deg) translate(0, -50%) scale(1);
    animation: bloom 2s ease-in-out infinite alternate 0.4s;
}

.petal:nth-child(4) {
    transform: rotate(270deg) translate(0, -50%) scale(1);
    animation: bloom 2s ease-in-out infinite alternate 0.6s;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes bloom {
    0% {
        transform: rotate(var(--r)) translate(0, -50%) scale(0.8);
        background-color: var(--color-secondary);
    }

    100% {
        transform: rotate(var(--r)) translate(0, -50%) scale(1.1);
        background-color: var(--color-primary);
    }
}

/* Fix for animation variable usage */
.petal:nth-child(1) {
    --r: 0deg;
}

.petal:nth-child(2) {
    --r: 90deg;
}

.petal:nth-child(3) {
    --r: 180deg;
}

.petal:nth-child(4) {
    --r: 270deg;
}