/* Main Stylesheet for Cappilli Calcestruzzi */
@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* HEADER E NAVBAR */
header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* LOGO - Immagini responsive */
.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-width: 430px;
    max-height: 90px;
    height: auto;
    display: block;
    transition: max-width 0.3s ease;
}

/* Hamburger Menu - Nascosto su desktop */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: white;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover {
    color: #43b3dc;
}

.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%23424242" width="1200" height="600"/><path fill="%23363636" d="M0 300L50 280L100 320L150 290L200 310L250 285L300 315L350 295L400 305L450 290L500 310L550 295L600 305L650 290L700 310L750 295L800 305L850 290L900 310L950 295L1000 305L1050 290L1100 310L1150 295L1200 305V600H0Z"/></svg>');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 70px;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.2s both;
}

.cta-button {
    background: #43b3dc;
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    animation: fadeInUp 1s ease 0.4s both;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background: #966193;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255,107,53,0.3);
}

section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    color: #1a1a1a;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #43b3dc;
    margin: 1rem auto 0;
}

/* IMMAGINI RESPONSIVE - Regola globale */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.chi-siamo-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.chi-siamo-text p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    line-height: 1.8;
}

.chi-siamo-image {
    background: linear-gradient(135deg, #43b3dc 0%, #ff8c5a 100%);
    height: 400px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: white;
}

.storia {
    background: #f8f9fa;
}

.storia-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.timeline-content {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.timeline-content h3 {
    color: #43b3dc;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.carousel-container {
    position: relative;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.carousel {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.carousel-slide {
    display: none;
    animation: fadeIn 0.5s;
}

.carousel-slide.active {
    display: block;
}

.carousel-image {
    background: linear-gradient(135deg, #43b3dc 0%, #ff8c5a 100%);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-text {
    font-size: 3rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.carousel-caption {
    text-align: center;
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,107,53,0.8);
    color: white;
    border: none;
    padding: 1rem 1.2rem;
    cursor: pointer;
    font-size: 1.5rem;
    border-radius: 5px;
    transition: background 0.3s;
    z-index: 10;
}

.carousel-btn:hover {
    background: rgba(255,107,53,1);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-dots {
    text-align: center;
    margin-top: 1.5rem;
}

.dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    margin: 0 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: #43b3dc;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.contatti {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.contatti-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contatti-info {
    background: white;
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contatti-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.contatti-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contatti-icon {
    font-size: 2rem;
    color: #43b3dc;
    margin-right: 1.5rem;
    min-width: 50px;
    text-align: center;
}

.contatti-details h3 {
    color: #1a1a1a;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.contatti-details p {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.contatti-details a {
    color: #43b3dc;
    text-decoration: none;
    transition: color 0.3s;
}

.contatti-details a:hover {
    color: #966193;
}

.contatti-map {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.map-placeholder {
    background: linear-gradient(135deg, #43b3dc 0%, #ff8c5a 100%);
    height: 100%;
    min-height: 400px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.flotta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.flotta-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

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

.flotta-icon {
    font-size: 3rem;
    color: #43b3dc;
    margin-bottom: 1rem;
}

.squadra {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: white;
}

.squadra .section-title {
    color: white;
}

.squadra-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.squadra-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.materiali-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.materiale-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #43b3dc;
    transition: transform 0.3s;
}

.materiale-card:hover {
    transform: translateX(10px);
}

.materiale-card h3 {
    color: #43b3dc;
    margin-bottom: 1rem;
}

footer {
    background: #1a1a1a;
    color: white;
    text-align: center;
    padding: 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

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

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   MEDIA QUERIES - MOBILE
   ======================================== */

@media (max-width: 768px) {
    /* Logo ridimensionato su mobile */
    .logo img {
        max-width: 200px;
    }

    /* Mostra hamburger menu solo su mobile */
    .hamburger {
        display: flex;
    }

    /* Menu mobile */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 2rem;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.3);
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        opacity: 0;
        transform: translateX(50px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.6s; }
    .nav-links.active li:nth-child(7) { transition-delay: 0.7s; }

    .nav-links a {
        font-size: 1.2rem;
    }

    /* Hero responsive */
    .hero {
        margin-top: 60px;
        height: 80vh;
    }

    .hero-content h1 {
        font-size: 2rem;
        padding: 0 1rem;
    }

    .hero-content p {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .cta-button {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }

    /* Sezioni */
    section {
        padding: 3rem 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Chi Siamo */
    .chi-siamo-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .chi-siamo-text p {
        font-size: 1rem;
    }

    .chi-siamo-image {
        height: 300px;
        font-size: 3rem;
    }

    /* Storia */
    .storia-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .timeline-content {
        padding: 1.5rem;
    }

    .timeline-content h3 {
        font-size: 1.3rem;
    }

    .carousel-container {
        padding: 1.5rem;
    }

    .carousel-image {
        height: 250px;
    }

    .carousel-image img {
        object-fit: cover;
    }

    .placeholder-text {
        font-size: 2rem;
    }

    .carousel-btn {
        padding: 0.8rem 1rem;
        font-size: 1.2rem;
    }

    .carousel-btn.prev {
        left: 5px;
    }

    .carousel-btn.next {
        right: 5px;
    }

    .carousel-caption {
        font-size: 1rem;
    }

    /* Flotta */
    .flotta-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .flotta-card {
        padding: 1.5rem;
    }

    .flotta-icon {
        font-size: 2.5rem;
    }

    /* Squadra */
    .squadra-content p {
        font-size: 1rem;
    }

    /* Materiali */
    .materiali-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .materiale-card {
        padding: 1.5rem;
    }

    /* Contatti */
    .contatti-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contatti-info {
        padding: 2rem;
    }

    .contatti-icon {
        font-size: 1.5rem;
        margin-right: 1rem;
        min-width: 40px;
    }

    .contatti-details h3 {
        font-size: 1.1rem;
    }

    .contatti-details p {
        font-size: 0.95rem;
    }

    .map-placeholder {
        min-height: 300px;
        font-size: 2rem;
    }

    /* Footer */
    footer {
        padding: 1.5rem;
    }

    .footer-content h3 {
        font-size: 1.2rem;
    }

    .footer-content p {
        font-size: 0.9rem;
    }
}

/* Tablet - Media query intermedia */
@media (max-width: 1024px) and (min-width: 769px) {
    .logo img {
        max-width: 350px;
    }

    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.95rem;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .chi-siamo-content,
    .storia-container {
        gap: 2rem;
    }
}
