/* ============================================
   STYLE.CSS - Stili Base e Homepage
   ============================================ */

/* Reset e Variabili */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    
}

:root {
    --primary-color: #2c3e50;    
    --secondary-color: #CC0000;
    --titleh2-color: #f4f4f4;
    --accent-color: #3498db;
    --text-color: #333;
    --light-gray: #f4f4f4;
    --border-color: #ddd;
    --background-color: #1C548C;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   HEADER - Comune a tutte le pagine
   ============================================ */
header {
    background: var(--primary-color);
    color: white;
    
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: bold;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover,
nav a.active {
    color: var(--secondary-color);
}

/* ============================================
   PLACEHOLDER IMAGES - Comune a tutte le pagine
   ============================================ */
.placeholder-img {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    text-align: center;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.placeholder-img.small {
    height: 100px;
}

.placeholder-img.medium {
    height: 250px;
}

.placeholder-img.large {
    height: 400px;
}

/* Stili per immagini reali */
.placeholder-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Quando c'è un'immagine, nascondi il testo placeholder */
.placeholder-img:has(img) span {
    display: none;
}

/* ============================================
   SEZIONI - Comune a tutte le pagine
   ============================================ */
section {
    padding: 4rem 0;
}

section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--titleh2-color);
    text-shadow: 4px -1px 6px black;
}

/* ============================================
   BOTTONI - Comune a tutte le pagine
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
    font-size: 1rem;
}

.btn:hover {
    background: #2980b9;
}

.btn.primary {
    background: var(--secondary-color);
}

.btn.primary:hover {
    background: #c0392b;
}

/* ============================================
   FOOTER - Comune a tutte le pagine
   ============================================ */
footer {
    background: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section p {
    margin: 0.5rem 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* ============================================
   STILI SPECIFICI HOMEPAGE
   ============================================ */

/* Hero Carousel */
.hero-carousel {
    position: relative;
    height: 1200px;
    overflow: hidden;
}

.carousel-container {
    position: relative;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

/* Immagini nel carosello */
.carousel-slide .placeholder-img {
    width: 100%;
    height: 100%;
}

.carousel-slide .placeholder-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.carousel-caption {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: white;
    background: rgba(0,0,0,0.5);
    padding: 2rem 3rem;
    border-radius: 10px;
}

.carousel-caption h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-size: 1.5rem;
    transition: background 0.3s;
}

.carousel-btn:hover {
    background: rgba(0,0,0,0.8);
}

.carousel-btn.prev {
    left: 20px;
}

.carousel-btn.next {
    right: 20px;
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: white;
}

/* Servizi */
.servizi {
    background: var(--background-color);
}

.servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.servizio-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 5px 10px 5px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.servizio-card:hover {
    transform: translateY(-5px);
}

.servizio-card h3 {
    margin: 1rem 0;
    color: var(--primary-color);
}

/* Galleria Homepage */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.gallery-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 5px 10px 5px 10px rgba(0,0,0,0.1);;
    transition: transform 0.3s;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-info {
    padding: 1.5rem;
}

.gallery-info h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.price {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: bold;
    margin: 1rem 0;
}

/* ============================================
   RESPONSIVE - Comune a tutte le pagine
   ============================================ */
@media (max-width: 768px) {
    .carousel-caption h2 {
        font-size: 1.5rem;
    }
    
    nav ul {
        gap: 1rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}