/* =============================================
   Casa Pallini - Custom Styles
   ============================================= */

/* CSS Variables */
:root {
    --primary: #1a365d;
    --primary-dark: #0f2340;
    --secondary: #d4a853;
    --accent: #c45c26;
    --bg-light: #faf9f7;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --white: #ffffff;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Base Styles */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary);
}

/* Override Bootstrap Primary */
.bg-primary {
    background-color: var(--primary) !important;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: #c4983f;
    border-color: #c4983f;
    color: var(--white);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: var(--white);
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

/* Top Bar */
.top-bar {
    position: relative;
    z-index: 1040;
}

.top-bar .dropdown-menu {
    z-index: 1050;
}

/* Navigation */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
    z-index: 1030;
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.navbar-brand {
    display: flex;
    flex-direction: column;
}

.brand-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 0.75rem;
    color: var(--secondary);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary) !important;
}

/* Hero Section with Slideshow */
.hero {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.25) 100%);
    z-index: 1;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 1.5rem;
}

.hero .lead {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .hero {
        min-height: 50vh;
    }

    .hero h1 {
        font-size: 2.25rem;
    }
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--secondary);
    margin: 1rem auto 0;
}

/* Feature Cards */
.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--white);
    font-size: 2rem;
}

.feature-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Amenity Items */
.amenity-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background: var(--white);
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.amenity-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-right: 1rem;
}

.amenity-content h5 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.amenity-content p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    box-shadow: var(--shadow);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 54, 93, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    color: var(--white);
    font-size: 2rem;
}

/* Booking Widget */
.booking-widget {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.booking-widget h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.price-display {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-light);
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.price-display .amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.price-display .period {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Form Styles */
.form-control, .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Guide Cards */
.guide-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.guide-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.guide-card-img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

.guide-card-body {
    padding: 1.5rem;
}

.guide-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.guide-card p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.guide-card .address {
    font-size: 0.85rem;
    color: var(--accent);
}

/* Local Place Cards */
.local-place-card {
    display: flex;
    align-items: center;
    background: var(--white);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.local-place-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-right: 1rem;
}

.local-place-info h5 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.local-place-info .distance {
    font-size: 0.85rem;
    color: var(--secondary);
    font-weight: 500;
}

.local-place-info p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Back to Top Button */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.btn-back-to-top.visible {
    display: flex;
}

/* Footer */
.footer {
    background: var(--primary-dark);
}

.footer h5, .footer h6 {
    color: var(--secondary);
}

.footer .social-links a:hover,
.footer a:hover {
    color: var(--secondary) !important;
}

/* Alerts & Messages */
.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

/* Category Pills */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-pill {
    padding: 0.5rem 1rem;
    background: var(--white);
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition);
}

.category-pill:hover,
.category-pill.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

/* Map Container */
.map-container {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 400px;
    border: none;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .booking-widget {
        margin-top: 2rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Flatpickr Custom Styles */
.flatpickr-calendar {
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
}

.flatpickr-day.selected {
    background: var(--primary);
    border-color: var(--primary);
}

.flatpickr-day:hover {
    background: var(--bg-light);
}

.flatpickr-day.disabled {
    background: #fee2e2 !important;
    color: #991b1b !important;
}

/* GLightbox Custom */
.glightbox-clean .gslide-title {
    font-family: var(--font-heading);
}
