/*
  File: style.css
  Project: Sweet Australia - Australian Desserts & Pastry Website
  Design System: Modern
  Trend: Dynamic Color Transitions
  Color Scheme: Complementary
  Animation Style: Bouncy Animations
*/

/* -------------------------------------------------- */
/* 1. CSS Variables & Root Configuration
/* -------------------------------------------------- */

:root {
    /* Color Palette - Complementary (Vibrant Orange & Deep Indigo) */
    --primary-color: #FF7B00; /* Vibrant Orange for energy */
    --secondary-color: #29339B; /* Deep Indigo for contrast and depth */
    --accent-color: #D4A017; /* Goldenrod for highlights and links */
    --primary-gradient: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    
    /* Typography */
    --text-dark: #222222;
    --text-muted: #6c757d;
    --text-light: #FFFFFF;
    --font-heading: 'Archivo Black', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* Backgrounds */
    --background-light: #f8f9fa;
    --background-dark: #121212;
    
    /* UI Elements */
    --border-radius: 0.5rem;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    --transition-bouncy: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    --transition-smooth: all 0.3s ease-in-out;
}

/* -------------------------------------------------- */
/* 2. Global Styles & Typography
/* -------------------------------------------------- */

body {
    font-family: var(--font-body);
    background-color: var(--text-light);
    color: var(--text-dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-dark);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
    text-transform: uppercase;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

section {
    padding-top: 6rem;
    padding-bottom: 6rem;
    overflow-x: hidden;
}

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

a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* -------------------------------------------------- */
/* 3. Reusable Components (Buttons, Cards)
/* -------------------------------------------------- */

/* Global Button Styles */
.btn {
    font-family: var(--font-heading);
    padding: 12px 30px;
    border-radius: 50px;
    border: none;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition-bouncy);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary-gradient);
    color: var(--text-light);
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(212, 160, 23, 0.4);
    color: var(--text-light);
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--text-light);
    transform: scale(1.05);
}

/* Global Card Styles */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition-bouncy);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.card-image {
    width: 100%;
    padding: 0;
    margin: 0;
    overflow: hidden;
    position: relative;
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
}

.card-image img {
    width: 100%;
    height: 250px; /* Fixed height for consistency */
    object-fit: cover;
    display: block;
}

/* Fix for signature bakes section images */
#casestudies .card-image img {
    height: 100%;
}

.card-content, .card-body {
    padding: 2rem;
    flex-grow: 1; /* Allows body to fill space */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-title {
    color: var(--secondary-color);
}

/* -------------------------------------------------- */
/* 4. Header & Navigation
/* -------------------------------------------------- */

.header {
    background-color: rgba(18, 18, 18, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color 0.3s ease-in-out;
}

.header.scrolled {
    background-color: var(--background-dark);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--text-light) !important;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-light) !important;
}

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.2);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* -------------------------------------------------- */
/* 5. Section Specific Styles
/* -------------------------------------------------- */

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
}

.hero-title {
    font-size: 4.5rem;
    text-transform: uppercase;
    color: var(--text-light);
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.hero-subtitle {
    font-size: 1.5rem;
    max-width: 700px;
    margin: 1rem auto 0;
    color: var(--text-light);
}

/* History (Accordion) Section */
.accordion-item {
    border: none;
    margin-bottom: 1rem;
    border-radius: var(--border-radius) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.accordion-header {
    border-radius: var(--border-radius);
}
.accordion-button {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--secondary-color);
    background-color: #fff;
    box-shadow: none !important;
}
.accordion-button:not(.collapsed) {
    color: var(--text-light);
    background: var(--primary-gradient);
}
.accordion-button::after {
    filter: brightness(0) invert(1);
}

/* Gallery Section */
.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    position: relative;
}
.gallery-item img {
    transition: var(--transition-bouncy);
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.modal-content {
    background-color: transparent;
    border: none;
}
.modal-header .btn-close {
    background-color: white;
    border-radius: 50%;
    padding: 0.5rem;
    opacity: 1;
}

/* Events Section */
.event-card {
    border: 2px solid transparent;
    border-image: var(--primary-gradient) 1;
}

/* Contact Section */
.contact-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.contact-form {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-form .form-label {
    color: var(--text-light);
    font-weight: 700;
}

.contact-form .form-control {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.9rem 1rem;
    color: var(--text-light);
    border-radius: 0.25rem;
}

.contact-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.contact-form .form-control:focus {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--text-light);
    box-shadow: 0 0 0 0.25rem rgba(255, 123, 0, 0.5);
    border-color: var(--primary-color);
}

/* -------------------------------------------------- */
/* 6. Footer
/* -------------------------------------------------- */

.footer {
    background-color: var(--background-dark);
}

.footer h6 {
    color: var(--accent-color);
}

.footer p {
    color: rgba(255, 255, 255, 0.7);
}

.footer a.text-reset {
    transition: var(--transition-smooth);
    color: rgba(255, 255, 255, 0.7) !important;
}

.footer a.text-reset:hover {
    color: var(--text-light) !important;
    text-decoration: none;
}

/* -------------------------------------------------- */
/* 7. Special Pages (Success, Privacy, Terms)
/* -------------------------------------------------- */

/* General page container for text-heavy pages */
.page-container {
    padding-top: 10rem; /* Header height + spacing */
    padding-bottom: 5rem;
}

/* Success Page */
.success-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    background: var(--background-light);
}

.success-page .icon {
    font-size: 5rem;
    color: var(--primary-color);
}

/* -------------------------------------------------- */
/* 8. Animations & Effects
/* -------------------------------------------------- */

/* Parallax Background Effect */
.parallax-bg {
    background-attachment: fixed;
}

/* Initial state for ScrollReveal animations */
[data-sr-id] {
    visibility: hidden;
}

/* -------------------------------------------------- */
/* 9. Media Queries for Responsiveness
/* -------------------------------------------------- */

@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--background-dark);
        padding: 1rem;
        margin-top: 1rem;
        border-radius: var(--border-radius);
    }
    .nav-link {
        margin: 0.5rem 0;
    }
    .hero-title {
        font-size: 3rem;
    }
    .section-title {
        font-size: 2rem;
    }
    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    .page-container {
        padding-top: 8rem;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.2rem;
    }
}