/* CafePlay Premium Design System */
:root {
    /* Colors */
    --primary: #E31B23;
    --primary-dark: #b9151b;
    --secondary: #64748b;
    --accent: #f59e0b;
    --background: #ffffff;
    --surface: #ffffff;
    --text: #1a1a1a;
    --text-muted: #6b7280;
    --border: #f3f4f6;

    /* Typography */
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Map to Bootstrap 5 Native Variables */
    --bs-font-sans-serif: var(--font-body);
    --bs-body-font-family: var(--font-body);
    --bs-heading-font-family: var(--font-heading);

    /* Spacing */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-4: 1rem;
    --spacing-8: 2rem;
    --spacing-16: 4rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Radius */
    --radius: 0.5rem;
}

body {
    font-family: var(--font-body);
    background-color: var(--background);
    color: var(--text);
    margin: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main.container {
    flex: 1;
    width: 100%;
    /* Ensure container fills width too */
    z-index: 10;
    /* Keep content above footer if overlapping happens */
    position: relative;
    background: var(--background);
    /* Ensure content has background */
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text);
    margin-top: 0;
    font-weight: 700;
    letter-spacing: -0.025em;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-4);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--border);
    color: var(--text-muted);
}

.btn-outline:hover {
    border-color: var(--text-muted);
    color: var(--text);
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: var(--spacing-8);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

/* Feature Grid Layout */
.feature-grid {
    margin-top: 8rem;
    /* More space for the pop-out heads */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 5rem;
        /* More gap on mobile for heads */
    }
}

/* Organic Cow Spot Cards */
.card-spot {
    background: white;
    padding: 2.5rem 2rem 2rem;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 3px solid var(--text);
    box-shadow: 8px 8px 0 rgba(227, 27, 35, 0.1);
    /* Removed overflow: hidden to allow bursting out */
    height: 100%;
    display: flex;
    flex-direction: column;
    margin-top: 40px;
    /* Push down to make room for head */
}

.card-spot:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 12px 12px 0 var(--primary);
    z-index: 10;
}

/* Different organic shapes for variety */
.shape-organic-1 {
    border-radius: 20px 50px 30px 60px / 50px 30px 60px 20px;
}

.shape-organic-2 {
    border-radius: 50px 20px 60px 30px / 30px 60px 20px 50px;
}

.shape-organic-3 {
    border-radius: 30px 60px 20px 50px / 60px 20px 50px 30px;
}

.card-spot h3 {
    font-size: 1.75rem;
    margin: 2rem 0 1rem;
    /* More top margin to clear the image shadow */
    font-weight: 800;
    color: var(--primary);
}

.card-spot p {
    font-size: 1.1rem;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 0;
    flex-grow: 1;
}

/* Image container to position it top center */
.card-spot-img-container {
    position: absolute;
    top: -80px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
    /* Let clicks pass through */
}

.card-spot img {
    width: 160px;
    /* Fixed restricted width */
    height: auto;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.15));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-spot:hover img {
    transform: scale(1.15) rotate(3deg) translateY(-10px);
}

/* Navbar Structure */
.navbar {
    background: var(--surface);
    border-bottom: 2px solid var(--text);
    /* Bold border */
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Comic Pop Art Line (Platform Only) */
.navbar-platform::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -30px;
    /* Hangs below */
    height: 30px;

    /* Red dots on white (Halftone) */
    background-color: white;
    background-image: radial-gradient(var(--primary) 35%, transparent 35%);
    background-size: 10px 10px;

    /* Slanted wedge shape: Taller on right (100%), shorter on left (20%) */
    clip-path: polygon(0 0, 100% 0, 100% 100%, 0 20%);

    /* Hard border adjustment */
    filter: drop-shadow(0 4px 0 rgba(0, 0, 0, 0.1));
    z-index: -1;
}

.navbar-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    /* Left, Center, Right */
    align-items: center;
}

.brand {
    display: flex;
    justify-content: center;
}

.brand-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    transition: transform 0.2s;
}

.brand:hover .brand-logo {
    transform: rotate(-3deg) scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.nav-left {
    justify-content: flex-start;
}

.nav-right {
    justify-content: flex-end;
}

.nav-links a:not(.btn) {
    color: var(--text);
    position: relative;
}

.nav-links a:not(.btn):hover {
    color: var(--primary);
}

.btn-demo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid black;
    box-shadow: 4px 4px 0 var(--text);
}

.btn-demo:hover {
    box-shadow: 2px 2px 0 var(--text);
    transform: translate(2px, 2px);
}

.demo-icon {
    height: 24px;
}

/* Mobile Toggle & Tray */
.mobile-toggle {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 0.5rem;
}

.mobile-toggle span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: 0.3s;
}

.mobile-tray {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    /* Dim backdrop */
    z-index: 2000;
    opacity: 0;
    /* pointer-events: none; REMOVED to allow backdrop click on parent if needed, but handled by JS usually */
    pointer-events: none;
    transition: opacity 0.3s;
}

.mobile-tray.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-tray-backdrop {
    /* Ensure backdrop covers everything behind the panel */
    cursor: pointer;
}

/* Ensure logo in tray isn't huge */
.tray-content img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

.tray-content {
    position: absolute;
    top: 0;
    left: -100%;
    /* Hidden left */
    width: 80%;
    max-width: 300px;
    height: 100%;
    background: white;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    border-right: 4px solid var(--text);
    transition: left 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy slide */
}

.mobile-tray.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-tray.open .tray-content {
    left: 0;
}

.close-tray {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: white;
    /* Visible on backdrop */
    z-index: 2001;
    /* Above panel if needed, but usually panel covers */
}

/* Move close button into panel context if useful */
.tray-content .close-tray {
    color: var(--primary);
    position: absolute;
    top: 10px;
    right: 10px;
}

.tray-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    font-size: 1.5rem;
    font-weight: 800;
}

.tray-links a {
    color: var(--text);
}

.no-scroll {
    overflow: hidden;
}

/* Responsive Adjustments */
@media (max-width: 900px) {
    .desktop-only {
        display: none;
    }

    .navbar-container {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        padding-bottom: 0.5rem;
    }

    .brand {
        order: 1;
    }

    .mobile-toggle {
        order: 2;
        display: flex;
        align-self: center;
        /* Centered under logo */
    }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: var(--spacing-16) 0;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: var(--spacing-4);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto var(--spacing-8);
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-4);
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--spacing-2);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Grid */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-8);
}

@media (max-width: 768px) {
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Elite Footer Styles */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.footer-col h5 {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0.8;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: inherit;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-col ul li a:hover {
    opacity: 1;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-col h5 {
        margin-bottom: 1rem;
    }
}


/* Responsive Visibility Utilities */
/* Mobile First: Default state (< 768px) */
.d-none {
    display: none !important;
}

.d-flex {
    display: flex !important;
}

/* Desktop-only elements: Hidden on mobile */
.d-md-flex {
    display: none !important;
}

/* Mobile-only elements: Visible on mobile */
.d-md-none {
    display: flex !important;
}

/* Desktop Breakpoint */
@media (min-width: 768px) {

    /* Show desktop elements */
    .d-md-flex {
        display: flex !important;
    }

    /* Hide mobile elements */
    .d-md-none {
        display: none !important;
    }

    .mobile-header-layout {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

/* Helper Classes */
.align-items-center {
    align-items: center;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.flex-column {
    flex-direction: column;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    padding: 0.5rem;
}

.phone-link {
    color: var(--text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
}

.mobile-menu a {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
    display: block;
    color: var(--text-color);
    font-weight: 500;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* Booking Categories */
.booking-card {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s;
    border: 1px solid #e5e7eb;
}

.booking-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}


/* Animation Utilities */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    /* fallback for shadow-lg if var missing */
}

.transition-all {
    transition: all 0.3s ease;
}

/* --- Calf-Eh Design Polish --- */

/* Cow Pattern Background */
.bg-cow-pattern {
    background-color: #ffffff;
    background-image: radial-gradient(#E31B23 15%, transparent 16%),
        radial-gradient(#E31B23 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    opacity: 0.05;
    /* Subtle background */
}

/* Footer Field */
.footer-field {
    background: url('/public/img/mascot/footer_composite.svg') no-repeat center bottom;
    background-size: cover;
    /* Fill the width entirely */
    background-repeat: no-repeat;
    padding-top: 250px;
    /* More space for the illustration */
    padding-bottom: 2rem;
    color: var(--text-muted);
    text-shadow: none;
    position: relative;
    margin-top: -2rem;
    z-index: 0;
}

.footer-field .container {
    position: relative;
    z-index: 1;
}

/* Animations */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes wiggle {
    0% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-5deg);
    }

    75% {
        transform: rotate(5deg);
    }

    100% {
        transform: rotate(0deg);
    }
}

@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-wiggle:hover {
    animation: wiggle 0.5s ease-in-out;
}

.animate-pop {
    animation: popIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Awesome Cards */
.card-awesome {
    background: white;
    border: 3px solid var(--text);
    border-radius: 1rem;
    box-shadow: 8px 8px 0px var(--primary);
    /* Hard shadow */
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card-awesome:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0px var(--primary);
}

.card-awesome::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: var(--primary);
}