/* ================================================================
   Bhawana Resto Website - Main CSS
   Custom styles to complement Tailwind CSS
   ================================================================ */

/* ================================================================
   Global Styles & Variables
   ================================================================ */
:root {
    --primary: #2D5F3F;
    --secondary: #1E90FF;
    --accent: #DAA520;
    --earth: #8B6F47;
    --cream: #F5F5DC;
    --dark: #2C3E50;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Prevent horizontal scroll on all devices */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Prevent mobile viewport issues */
@media (max-width: 768px) {
    * {
        max-width: 100vw;
    }

    img, video, iframe {
        max-width: 100%;
        height: auto;
    }
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    padding-top: 0;
    max-width: 100vw;
    position: relative;
}

/* Add padding to main content to account for fixed header */
main {
    position: relative;
}

/* ================================================================
   Typography
   ================================================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

/* ================================================================
   Header & Navigation
   ================================================================ */
#header {
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Enhanced header visibility on mobile */
@media (max-width: 1024px) {
    #header {
        background: rgba(45, 95, 63, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
}

#header.scrolled {
    background: rgba(45, 95, 63, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Ensure header text is always visible */
#header nav a,
#header nav .text-white {
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#header .text-accent {
    color: #DAA520 !important;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Mobile Menu Toggle Button - Enhanced Visibility */
#mobile-menu-toggle {
    background: rgba(45, 95, 63, 0.9);
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#mobile-menu-toggle:hover {
    background: rgba(45, 95, 63, 1);
    border-color: #DAA520;
    transform: scale(1.05);
}

#mobile-menu-toggle i {
    display: block;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Ensure burger icon is hidden on desktop (lg breakpoint = 1024px) */
@media (min-width: 1024px) {
    #mobile-menu-toggle {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Ensure burger icon is visible on mobile/tablet */
@media (max-width: 1023px) {
    #mobile-menu-toggle {
        display: block !important;
        visibility: visible !important;
    }
}

/* Mobile Menu Styling */
#mobile-menu {
    background: linear-gradient(135deg, #1a3a2e 0%, #2D5F3F 50%, #1a3a2e 100%);
    /* Ensure full opacity - no transparency */
    opacity: 1 !important;
    /* Ensure mobile menu is hidden off-screen by default */
    left: 0;
    right: 0;
    width: 100vw;
    max-width: 100vw;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Hide mobile menu by default - ensure it's off screen */
#mobile-menu.-translate-x-full {
    transform: translateX(-100%);
    visibility: hidden;
}

#mobile-menu a {
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

#mobile-menu a:hover {
    background: rgba(218, 165, 32, 0.2);
    transform: translateX(5px);
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    body, html {
        width: 100vw;
        overflow-x: hidden;
        position: relative;
    }

    /* Ensure main content takes full width */
    main {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Container adjustments for mobile */
    .container {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* Improve button visibility */
.btn {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* ================================================================
   Hero Slider Section Styles
   ================================================================ */
.hero-slider-section {
    position: relative;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.hero-slider-wrapper {
    position: relative;
    width: 100%;
    height: 70vh; /* Reduced from 100vh */
    min-height: 500px;
    max-height: 700px;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(45, 95, 63, 0.5) 0%, rgba(30, 144, 255, 0.3) 100%);
    z-index: 2;
}

.hero-slide .container {
    position: relative;
    z-index: 10;
}

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

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

.hero-title,
.hero-subtitle {
    text-shadow: 0 4px 12px rgba(0,0,0,0.5);
}

/* Slider Navigation Buttons - Hidden */
.hero-slider-prev,
.hero-slider-next {
    display: none; /* Arrows removed */
}

/* Slider Indicators */
.hero-slider-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: 12px;
}

.hero-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.2);
}

.hero-indicator.active {
    background: #DAA520;
    border-color: #DAA520;
    width: 30px;
    border-radius: 6px;
}

.scroll-indicator {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 20;
    animation: bounce 2s infinite;
}

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-slider-wrapper {
        height: 60vh;
        min-height: 400px;
        max-height: 600px;
    }

    .hero-indicator {
        width: 10px;
        height: 10px;
    }

    .hero-indicator.active {
        width: 24px;
    }

    .scroll-indicator {
        bottom: 60px;
    }
}

/* ================================================================
   Cards & Containers
   ================================================================ */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

.card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-image {
    transform: scale(1.1);
}

/* ================================================================
   Buttons
   ================================================================ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.3);
}

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

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

/* Responsive button sizing */
@media (max-width: 640px) {
    .btn {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
}

/* ================================================================
   Forms
   ================================================================ */
.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-error {
    color: #ef4444;
    font-size: 14px;
    margin-top: 5px;
}

.form-success {
    color: #10b981;
    font-size: 14px;
    margin-top: 5px;
}

/* ================================================================
   Loading Spinner
   ================================================================ */
.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ================================================================
   Back to Top Button
   ================================================================ */
#back-to-top {
    transition: all 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* ================================================================
   Pulse Animation for WhatsApp Button
   ================================================================ */
.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

/* ================================================================
   Image Gallery Grid
   ================================================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Responsive layout for gallery grid - 6 images perfect layout */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

@media (max-width: 640px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    aspect-ratio: 4/3;
}

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

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(45, 95, 63, 0.85) 0%, rgba(30, 144, 255, 0.85) 100%);
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: white;
    transform: scale(0.9);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
    transform: scale(1);
}

.gallery-overlay h4 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gallery-overlay p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.gallery-overlay i.fa-search-plus {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ================================================================
   Badges & Tags
   ================================================================ */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-green {
    background: #10b981;
    color: white;
}

.badge-blue {
    background: var(--secondary);
    color: white;
}

.badge-orange {
    background: #f97316;
    color: white;
}

.badge-gold {
    background: var(--accent);
    color: white;
}

/* ================================================================
   Star Rating
   ================================================================ */
.star-rating {
    color: var(--accent);
    font-size: 18px;
}

.star-rating i {
    margin-right: 2px;
}

/* ================================================================
   Testimonial Cards
   ================================================================ */
.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: relative;
}

.testimonial-card::before {
    content: '\f10d';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 40px;
    color: var(--accent);
    opacity: 0.2;
}

/* ================================================================
   Distance Categories (Nearby Attractions)
   ================================================================ */
.category-within-reach {
    border-left: 4px solid #10b981;
}

.category-half-day {
    border-left: 4px solid var(--secondary);
}

.category-full-day {
    border-left: 4px solid #f97316;
}

/* ================================================================
   Section Spacing
   ================================================================ */
.section-padding {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section-padding {
        padding: 50px 0;
    }
}

/* Fix for sections immediately after hero */
.hero-section + section {
    margin-top: 0;
}

/* Improve section backgrounds */
.bg-cream {
    background-color: #F5F5DC;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

/* ================================================================
   Responsive Typography
   ================================================================ */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

/* ================================================================
   Utility Classes
   ================================================================ */
.text-gradient {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    color: #6b7280;
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

/* ================================================================
   Custom Scrollbar
   ================================================================ */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ================================================================
   Lightbox Customization
   ================================================================ */
.lb-data .lb-close {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" fill="white" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>') no-repeat center;
}

/* ================================================================
   Animations
   ================================================================ */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.slide-up {
    animation: slideUp 0.8s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ================================================================
   Print Styles
   ================================================================ */
@media print {
    header, footer, #back-to-top, .whatsapp-button {
        display: none;
    }
}

/* ================================================================
   Accessibility
   ================================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* ================================================================
   Masonry Layout (for blog/gallery)
   ================================================================ */
.masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.masonry-grid .gallery-item {
    opacity: 1;
    transform: scale(1);
    transition: opacity 0.3s ease, transform 0.3s ease, display 0.3s ease;
}

.masonry-item {
    grid-row-end: span var(--row-span, 10);
}

/* Responsive masonry for gallery page */
@media (max-width: 1024px) {
    .masonry-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 16px;
    }

    .gallery-item {
        aspect-ratio: 4/3;
    }
}

@media (max-width: 640px) {
    .masonry-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-item {
        aspect-ratio: 16/9;
    }

    .gallery-overlay {
        padding: 15px;
    }

    .gallery-overlay h4 {
        font-size: 1rem;
    }

    .gallery-overlay p {
        font-size: 0.75rem;
    }

    .gallery-overlay i.fa-search-plus {
        font-size: 1.5rem;
    }
}
