/* ============================================
   Royal Bazaar — Custom Styles
   ============================================ */

/* Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #781c21;
    color: #faf9f6;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#navbar.scrolled {
    background-color: rgba(250, 249, 246, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(120, 28, 33, 0.1);
}

/* Mobile Menu */
#mobile-menu {
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-btn.active .menu-line:first-child {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-subtitle {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.2s;
}

.hero-title {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.4s;
}

.hero-desc {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.6s;
}

.hero-cta {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.8s;
}

.hero-image-main {
    animation: fadeInScale 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.5s;
    opacity: 0;
    transform: scale(0.95);
}

.hero-image-accent {
    animation: fadeInScale 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.8s;
    opacity: 0;
    transform: scale(0.95);
}

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.scroll-line {
    animation: scrollDown 1.5s ease-in-out infinite;
}

@keyframes scrollDown {
    0% {
        transform: translateY(-100%);
    }
    50% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(100%);
    }
}

/* ============================================
   Section Labels
   ============================================ */
.section-label {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.about-label {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

.about-title {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.2s;
}

.services-title {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

.gallery-title {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

.visit-title {
    animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    animation-delay: 0.1s;
}

/* ============================================
   About Section
   ============================================ */
.about-text p {
    animation: fadeIn 0.6s ease forwards;
}

.about-text p:nth-child(1) {
    animation-delay: 0.3s;
}

.about-text p:nth-child(2) {
    animation-delay: 0.5s;
}

.about-text p:nth-child(3) {
    animation-delay: 0.7s;
}

.about-stats {
    animation: fadeIn 0.6s ease forwards;
    animation-delay: 0.9s;
}

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

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.service-card:nth-child(1) { transition-delay: 0.1s; }
.service-card:nth-child(2) { transition-delay: 0.2s; }
.service-card:nth-child(3) { transition-delay: 0.3s; }
.service-card:nth-child(4) { transition-delay: 0.4s; }
.service-card:nth-child(5) { transition-delay: 0.5s; }
.service-card:nth-child(6) { transition-delay: 0.6s; }

/* ============================================
   Gallery
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 16px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item-large {
    grid-column: 1;
    grid-row: 1 / 3;
}

.gallery-item-large img {
    height: 100%;
    min-height: 500px;
}

.gallery-item-small {
    height: 242px;
}

.gallery-item-wide {
    grid-column: 1 / 3;
}

.gallery-item-wide img {
    height: 100%;
    min-height: 250px;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(120, 28, 33, 0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ============================================
   Form Styles
   ============================================ */
.form-input {
    background: transparent;
}

.form-input:focus {
    border-bottom-color: #781c21 !important;
}

.form-input::placeholder {
    color: #8c8680;
}

.form-submit {
    position: relative;
    overflow: hidden;
}

.form-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.form-submit:hover::before {
    left: 100%;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 1023px) {
    .hero-title {
        font-size: 4.5rem;
    }
    
    .gallery-item-large img {
        min-height: 350px;
    }
}

@media (max-width: 767px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .about-title,
    .services-title,
    .gallery-title,
    .visit-title {
        font-size: 2.5rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item-large {
        grid-column: 1;
        grid-row: auto;
    }
    
    .gallery-item-large img {
        min-height: 300px;
    }
    
    .gallery-item-small {
        height: 200px;
    }
    
    .gallery-item-wide {
        grid-column: 1;
    }
    
    .gallery-item-wide img {
        min-height: 200px;
    }
}

@media (max-width: 639px) {
    .hero-title {
        font-size: 2.75rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
