:root {
    --primary-color: #8B4513;
    --secondary-color: #D4AF37;
    --accent-color: #F5E6D3;
    --text-dark: #2C1810;
    --text-light: #6B5B47;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

.font-serif {
    font-family: 'Playfair Display', serif;
}

.hero-section {
    background: linear-gradient(rgba(139, 69, 19, 0.7), rgba(139, 69, 19, 0.5)), 
                url('img/sfondo.jpeg') center/cover;
    height: 100vh;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
}

.hero-content {
    text-align: center;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
}

.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

.section-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--secondary-color);
}

.history-section {
    background: var(--accent-color);
    padding: 80px 0;
}

.feature-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

.card-img-top {
    height: 250px;
    object-fit: cover;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
}

/* --- Mobile-friendly carousel & modal gallery enhancements --- */
.modal .carousel {
    background: #000; /* better contrast around images */
}

.modal .lightbox-img {
    max-height: calc(100vh - 140px); /* keep controls visible */
    object-fit: contain;             /* avoid cropping on small screens */
    background: #000;                /* no white borders around images */
}

/* Bigger tap targets for prev/next on touch devices */
.carousel-control-prev,
.carousel-control-next {
    width: 20%; /* larger hit area on mobile */
}

@media (min-width: 992px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 12%;
    }
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    transform: scale(1.4); /* bigger arrows */
    filter: drop-shadow(0 2px 2px rgba(0,0,0,0.6));
}

/* Indicators: larger and easier to tap */
.carousel-indicators {
    margin-bottom: 0.75rem;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.7);
}

.carousel-indicators .active {
    background-color: #fff;
}

/* Slide counter overlay (e.g., 3/12) */
.carousel-counter {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 5;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.gallery-img {
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

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

.info-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 80px 0;
}

.contact-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer {
    background: var(--text-dark);
    color: white;
    padding: 40px 0 20px;
}

.ornament {
    color: var(--secondary-color);
    font-size: 2rem;
    margin: 20px 0;
}

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

/* Lightbox image inside modal: keep aspect and fit viewport */
.lightbox-img {
    max-height: 80vh;
    object-fit: contain;
    background: #000;
}

/* Booking calendar */
.calendar { display: grid; gap: 6px; }
.calendar-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.calendar-head .calendar-cell { text-align: center; font-weight: 600; color: #6c757d; }
/* Ensure each calendar day fills its grid cell consistently on all devices */
.calendar-cell { 
    width: 100%;
    min-height: 48px; /* fallback */
    aspect-ratio: 1 / 1; /* square cells where supported */
    display: flex; align-items: center; justify-content: center;
    padding: 0; /* override .btn default */
}
.calendar-cell.available { cursor: pointer; }
.calendar-cell.occupied { color: #fff; }
/* Better contrast for past days */
.calendar-row .btn-outline-secondary { color: #6c757d; border-color: #ced4da; background-color: #f8f9fa; }
/* Make buttons not shrink text on small screens */
@media (max-width: 576px) {
  .calendar { gap: 4px; }
  .calendar-row { gap: 4px; }
  .calendar-cell { min-height: 42px; font-size: 0.9rem; }
}
.booking-card { border: 1px solid rgba(0,0,0,0.08); }
