/* Components CSS - Forms, buttons, slider, specific components */

/* Buttons */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background: var(--medio-blue);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    text-transform: capitalize;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    text-decoration: none;
}

.btn:hover {
    background: var(--dark-blue);
    color: white;
}

.btn:focus {
    outline: 2px solid var(--secondary-blue);
    outline-offset: 2px;
}

.btn-large {
    padding: var(--spacing-md) var(--spacing-xl);
    font-size: 1.1em;
}

.btn-block {
    width: 100%;
    display: block;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-size: var(--font-size-base);
    color: var(--text-primary);
    font-weight: 500;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: var(--font-size-small);
    color: var(--text-secondary);
    background: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 3px rgba(50, 162, 227, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}



/* Contact Form */
.contact-form {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px var(--shadow-color);
}

.contact-form h3 {
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 100;
    margin-bottom: var(--spacing-lg);
}

.contact-info {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px var(--shadow-color);
}

.contact-info h3 {
    color: var(--text-primary);
    font-size: var(--font-size-large);
    font-weight: 100;
    margin-bottom: var(--spacing-lg);
}

.contact-address p {
    color: var(--text-primary);
    font-size: 0.8125em;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.contact-address a {
    color: var(--light-blue);
    transition: var(--transition);
}

.contact-address a:hover {
    color: var(--text-primary);
}

/* Map container */
.map-container {
    margin: var(--spacing-lg) 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: none;
}

/* Hero Slider - Versione Semplice */
.hero-slider {
    position: relative;
    width: 100%;
    height: clamp(400px, 60vh, 700px);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 20px var(--shadow-color);
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.hero-slider .slide.active {
    opacity: 1;
}

.hero-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.8);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    z-index: 10;
    transition: background 0.3s ease;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.9);
}

.nav-btn.prev {
    left: 20px;
}

.nav-btn.next {
    right: 20px;
}

.dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.dot.active,
.dot:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .nav-btn.prev {
        left: 10px;
    }
    
    .nav-btn.next {
        right: 10px;
    }
    
    .dots {
        bottom: 15px;
        gap: 8px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

/* Room details grid */
.room-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

@media (min-width: 48em) {
    .room-details {
        grid-template-columns: auto 1fr;
        align-items: start;
    }
}

.room-image {
    width: 100%;
    max-width: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow-color);
}

.room-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

.room-description {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px var(--shadow-color);
    height: fit-content;
}


/* Services grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin: var(--spacing-xl) 0;
}

.service-item {
    text-align: center;
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-color);
}

.service-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin-bottom: var(--spacing-md);
    transition: opacity 0.3s ease;
}

.service-item:hover img {
    opacity: 0.8;
}

.service-item h3 {
    font-size: var(--font-size-base);
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    transition: var(--transition);
}

.service-item h3:hover {
    color: var(--light-blue);
}

.service-item p {
    font-size: var(--font-size-small);
    color: var(--text-secondary);
    margin-bottom: var(--spacing-sm);
}

.service-item a {
    color: var(--light-blue);
    font-style: italic;
    font-size: var(--font-size-small);
    transition: var(--transition);
}

.service-item a:hover {
    color: var(--text-primary);
}

/* Booking links */
.booking-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
}

.booking-links img {
    height: 23px;
    width: auto;
    transition: opacity 0.3s ease;
}

.booking-links a:hover img {
    opacity: 0.7;
}



/* Image gallery/slider for room pages */
.room-gallery {
    position: relative;
    margin-bottom: var(--spacing-xl);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 6px var(--shadow-color);
    background: white;
}

.gallery-main {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnails {
    display: flex;
    padding: var(--spacing-sm);
    gap: var(--spacing-xs);
    background: white;
    overflow-x: auto;
    scrollbar-width: thin;
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 4px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--secondary-blue);
    border-radius: 2px;
}

.thumbnail-item {
    flex-shrink: 0;
    width: 80px;
    height: 50px;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    border: 2px solid transparent;
}

.thumbnail-item.active,
.thumbnail-item:hover {
    opacity: 1;
    border-color: var(--secondary-blue);
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive — mobile breakpoint */
@media (max-width: 48em) {
    .room-details {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .room-image {
        max-width: none;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .booking-links {
        justify-content: center;
    }

    .gallery-main {
        height: 300px;
    }
}

/* Additional styles for new components */

/* Form styling enhancements */
.form-help {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.85em;
    color: var(--text-secondary);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.error-message {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.85em;
    color: #dc3545;
    font-weight: 500;
}

/* Checkbox styling */
.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: var(--font-size-small);
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
}

/* Room features styling */
.room-features {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin: var(--spacing-sm) 0;
}

.feature {
    background: var(--border-color);
    color: var(--text-primary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
}

/* Pricing display */
.pricing {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-sm) 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.price {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--secondary-blue);
    display: block;
    margin-bottom: var(--spacing-xs);
}

/* Hours table */
.hours-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
}

.hours-table td {
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
}

.hours-table td:first-child {
    padding-right: var(--spacing-md);
}

/* FAQ styling */
.faq-list {
    margin: var(--spacing-lg) 0;
}

.faq-item {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-sm);
}

.faq-item summary {
    padding: var(--spacing-md) 0;
    cursor: pointer;
    font-weight: 600;
    color: var(--primary-blue);
    list-style: none;
}

.faq-item summary::after {
    content: '+';
    float: right;
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    transform: rotate(45deg);
}

.faq-item p {
    padding: 0 0 var(--spacing-md) 0;
    margin: 0;
    color: var(--text-secondary);
}

/* Info sections */
.info-section h3 {
    color: var(--primary-blue);
    margin: var(--spacing-lg) 0 var(--spacing-sm) 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-xs);
}

.info-section h3:first-child {
    margin-top: 0;
}

/* Text utilities */
.text-small {
    font-size: 0.85em;
}

.form-note {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Focus styles for keyboard navigation */
.keyboard-navigation :focus {
    outline: 2px solid var(--secondary-blue);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header-bg,
    .footer-bg,
    .mobile-nav,
    .language-selector,
    .social-icons,
    .btn,
    .slider-nav,
    .slider-progress {
        display: none !important;
    }
    
    .main-bg {
        background: white !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
    
    a[href^="#"]:after,
    a[href^="javascript:"]:after {
        content: "";
    }
}