/* Base Styles */
:root {
    --primary-color: #4CAF50;
    --secondary-color: #2196F3;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #fff;
}

a {
    text-decoration: none;
    color: var(--dark-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
}

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

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 15px 0;
    transition: padding 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease; /* Add smooth transition */
}

.navbar.scrolled {
    padding: 5px 0; /* Reduced padding when scrolled */
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.logo img {
    max-height: 80px; /* Adjust this value as needed */
    width: auto;
    transition: max-height 0.3s ease; /* Add smooth transition effect */
}

.navbar.scrolled .logo img {
    max-height: 50px; /* Reduced height when scrolled */
}

.nav-menu {
    display: flex;
}

.nav-menu li {
    margin-left: 25px;
}

.nav-link {
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

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

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--dark-color);
    transition: var(--transition);
}

/* Mosaic Grid Section */
.mosaic-grid {
    padding: 80px 0;
    background-color: var(--light-color);
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 250px;
    gap: 20px;
    padding: 0 15px;
}

.grid-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-5px);
}

.grid-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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



@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    
    .grid-item.large {
        grid-column: span 2;
        grid-row: span 1;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
        grid-auto-rows: 200px;
    }
    
    .grid-item.large {
        grid-column: span 1;
        grid-row: span 1;
    }
}

/* Hero Section & Carousel */
.hero {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.carousel-container {
    height: 100%;
    position: relative;
}

.carousel {
    height: 100%;
    width: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
}

.slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: brightness(0.7);
}

.slide-content {
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 0 20px;
    z-index: 1;
}

.slide-content h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active {
    background-color: #fff;
    transform: scale(1.2);
}

.cta-container {
    position: absolute;
    top: calc(50% + 80px);  /* Position it below the center where the text is */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: #3d8b40;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* About Section */
.about {
    padding: 100px 0;
    background-color: var(--light-color);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.about-content p {
    margin-bottom: 20px;
}

/* Modern Products Section - Desktop Only */
.products {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.products .container {
    max-width: var(--max-width);
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    gap: 30px;
    margin-top: 50px;
}

/* Posizionamento specifico per il terzo prodotto */
.products-grid .product-card:nth-child(3) {
    grid-column: 1 / span 2;
    max-width: 600px;
    margin: 0 auto;
}

.product-card {
    background-color: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-card:hover .product-overlay {
    opacity: 1;
}

.product-content {
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.product-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: -30px;
    position: relative;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.product-icon i {
    font-size: 24px;
    color: white;
}

.product-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
    position: relative;
    padding-bottom: 15px;
}

.product-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.product-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.product-features {
    margin-top: auto;
    background-color: #f8f8f8;
    padding: 20px;
    border-radius: 10px;
}

.product-features h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.product-features ul {
    padding-left: 5px;
    list-style: none;
}

.product-features ul li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
    font-size: 0.95rem;
}

.product-features ul li::before {
    content: '\f00c';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

.product-cta {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-cta:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid .product-card:nth-child(3) {
        grid-column: 1;
        max-width: 100%;
    }
    
    .product-item,
    .product-item.reverse {
        flex-direction: column;
        margin-bottom: 50px;
    }
    
    .product-image,
    .product-info {
        flex: 1;
        padding: 0;
        margin-bottom: 20px;
    }
    
    .product-info h3 {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .product-cta {
        display: block;
        text-align: center;
        margin: 0 auto;
        width: 80%;
    }
}

/* Reviews Section */
.reviews {
    padding: 100px 0;
    background-color: var(--light-color);
}

.reviews-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
}

.review-card {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

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

.review-profile {
    text-align: center;
    margin-bottom: 20px;
}

.review-profile img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--primary-color);
}

.review-profile h4 {
    margin-bottom: 5px;
    color: var(--dark-color);
}

.stars {
    color: #FFD700;
    margin-bottom: 10px;
}

/* Modern Contact Section */
.contact {
    padding: 100px 0;
    background-color: #f9f9f9;
}

.section-subtitle {
    text-align: center;
    margin-bottom: 50px;
    color: #666;
    font-size: 1.1rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 30px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
}

.contact-info-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2E8B57 100%);
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.contact-header {
    margin-bottom: 40px;
}

.contact-header h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.contact-details {
    flex-grow: 1;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.icon-container {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.icon-container i {
    font-size: 1.2rem;
}

.info-content h4 {
    margin-bottom: 5px;
    font-size: 1rem;
    font-weight: 600;
}

.info-content a {
    color: white !important;
}

.social-media {
    margin-top: 20px;
}

.social-media h4 {
    margin-bottom: 15px;
    font-size: 1rem;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-5px);
}

.contact-form-card {
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f8f8;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
    background-color: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #aaa;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    margin-top: 5px;
}

.checkbox-group label {
    display: inline;
    font-size: 0.9rem;
    font-weight: normal;
    color: #666;
}

.submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    width: 100%;
}

.submit-btn:hover {
    background-color: #3d8b40;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.submit-btn i {
    transition: transform 0.3s ease;
}

.submit-btn:hover i {
    transform: translateX(5px);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

.product-item {
    flex-direction: column-reverse;
}

.product-item.reverse {
    flex-direction: column;
}

.product-image, .product-info {
    width: 100%;
    margin-bottom: 30px;
}

/* Special handling for security system section */
.product-item.reverse:nth-of-type(2) {
    display: flex;
    flex-direction: column-reverse;
}

.slide-content h1 {
    font-size: 2.5rem;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #fff;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .slide-content h1 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

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

    .footer-content > div {
        flex: 100%;
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .slide-content h1 {
        font-size: 1.8rem;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .review-card {
        min-width: 100%;
    }
}

/* Modern Footer Styles */
.footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 70px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 50px;
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}
.footer-brand h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-brand p {
    margin-bottom: 20px;
    color: #b3b3b3;
    line-height: 1.5;
}

.footer-brand .social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.footer-brand .social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #fff;
    transition: all 0.3s ease;
}

.footer-brand .social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-nav ul li,
.footer-contact ul li {
    margin-bottom: 12px;
}

.footer-nav ul li a {
    color: #b3b3b3;
    transition: all 0.3s ease;
}

.footer-nav ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-contact ul li {
    display: flex;
    align-items: flex-start;
    color: #b3b3b3;
}

.footer-contact ul li i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-contact ul li a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-contact ul li a:hover {
    color: var(--primary-color);
}

.footer-newsletter p {
    color: #b3b3b3;
    margin-bottom: 15px;
    line-height: 1.5;
}

.newsletter-form {
    display: flex;
    height: 45px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px 15px;
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 4px 0 0 4px;
}

.newsletter-form input::placeholder {
    color: #b3b3b3;
}

.newsletter-form button {
    width: 45px;
    background-color: var(--primary-color);
    border: none;
    color: white;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.newsletter-form button:hover {
    background-color: #3d8b40;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

.footer-bottom p {
    color: #b3b3b3;
}

.footer-legal {
    display: none;
}
.footer-legal a {
    color: #b3b3b3;
    transition: all 0.3s ease;
}

.footer-legal a:hover {
    color: var(--primary-color);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .footer h4 {
        text-align: left;
    }
    
    .footer h4::after {
        left: 0;
        transform: none;
    }
}

.product-item {
    flex-direction: column-reverse;
}

.product-item.reverse {
    flex-direction: column;
}

.product-image, .product-info {
    width: 100%;
    margin-bottom: 30px;
}

/* Special handling for security system section */
.product-item.reverse:nth-of-type(2) {
    display: flex;
    flex-direction: column-reverse;
}

.slide-content h1 {
    font-size: 2.5rem;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #f3f3f3;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        z-index: -1 !important;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .slide-content h1 {
        font-size: 2rem;
    }

    .slide-content p {
        font-size: 1rem;
    }

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

    .footer-content > div {
        flex: 100%;
        margin-bottom: 30px;
    }
}

@media (max-width: 576px) {
    .slide-content h1 {
        font-size: 1.8rem;
    }

    .cta-button {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .review-card {
        min-width: 100%;
    }
}

/* Modern Footer Logo */
.footer-logo {
    max-width: 200px;
    height: auto;
    margin-bottom: 20px;
}

/* Modern Footer - Mobile Carousel */
.mobile-reviews-carousel {
    display: none; /* Hidden by default, shown only on mobile */
}

.review-slides {
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
}

.review-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.review-slide.active {
    display: block;
    opacity: 1;
}

.review-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.prev-review, .next-review {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.prev-review:hover, .next-review:hover {
    background-color: #3d8b40;
}

.review-indicators {
    display: flex;
    margin: 0 15px;
}

.review-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    margin: 0 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.review-indicator.active {
    background-color: var(--primary-color);
}

/* Media Query for Mobile */
@media (max-width: 768px) {
    .desktop-reviews {
        display: none; /* Hide desktop version on mobile */
    }

    .mobile-reviews-carousel {
        display: block; /* Show mobile carousel */
    }

    .review-card {
        min-width: unset;
        margin: 0 auto;
    }
}

/* Checkbox styling */
.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    vertical-align: middle;
}

.form-group input[type="checkbox"] + label {
    display: inline;
    font-size: 0.9rem;
}