/* 
 * Verde Aventino Garden - Custom Styles
 * Modern enhancements and optimizations
 */

/* ===================================
   Color Variables
   =================================== */
:root {
    --primary-green: #2d5016;
    --secondary-green: #4a7c2c;
    --accent-green: #6ba83e;
    --light-green: #8bc34a;
    --earth-brown: #8b7355;
    --light-brown: #d4a574;
    --light-bg: #f8f9fa;
    --dark-text: #333333;
    --light-text: #666666;
    --white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* ===================================
   Global Improvements
   =================================== */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
    font-family: 'Poppins', sans-serif;
    color: var(--dark-text);
    line-height: 1.8;
}

/* Smooth transitions for all elements */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Remove transition from transform-heavy elements for performance */
.slick-track,
.slick-slide {
    transition: none !important;
}

/* ===================================
   Typography Enhancements
   =================================== */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-green);
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--light-text);
}

/* ===================================
   Modern Button Styles
   =================================== */
.wrd-button {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.wrd-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-green), var(--accent-green));
    transition: width 0.4s ease;
    z-index: -1;
}

.wrd-button:hover::before {
    width: 100%;
}

.wrd-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--white);
}

/* ===================================
   Header Enhancements
   =================================== */
.header-area {
    box-shadow: var(--shadow-md);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top-area {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: var(--white);
    padding: 10px 0;
}

/* Right align header top content */
.header-top-area .top-info {
    text-align: right;
}

.header-top-area .wrd-list-inline {
    justify-content: flex-end;
    margin-bottom: 0;
}

/* Mobile responsive alignment */
@media (max-width: 767.98px) {
    .header-top-area .top-info {
        text-align: center;
    }
    
    .header-top-area .wrd-list-inline {
        justify-content: center;
        flex-direction: column;
        gap: 5px;
    }
    
    .header-top-area .wrd-list-inline li {
        margin: 2px 0;
    }
}

.header-top-area a {
    color: var(--white);
    transition: opacity 0.3s ease;
}

.header-top-area a:hover {
    opacity: 0.8;
}

.main-menu-area {
    padding: 15px 0;
}

.main-navigation .menu>li>a {
    font-weight: 600;
    color: var(--dark-text);
    padding: 10px 20px;
    position: relative;
}

.main-navigation .menu>li>a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-green);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-navigation .menu>li>a:hover::after,
.main-navigation .menu>li.current-menu-item>a::after {
    width: 80%;
}

/* ===================================
   Service Cards Enhancement
   =================================== */
.wrd-service-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.wrd-service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.8), rgba(74, 124, 44, 0.8));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.wrd-service-item:hover::before {
    opacity: 1;
}

.wrd-service-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

/* ===================================
   Products Grid Layout - 3+2 Design
   =================================== */

/* Products grid container */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
    align-items: stretch;
}

/* Desktop: Use CSS Grid for precise 3+3 layout */
@media (min-width: 992px) {
    .products-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 columns for 3+3 layout */
        grid-template-rows: auto auto;
        gap: 30px;
        margin: 0;
        align-items: stretch;
    }
    
    /* Remove padding from grid items */
    .col-product {
        padding: 0;
        margin-bottom: 0;
    }
    
    /* First row - products 1, 2, 3 */
    .col-product:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }
    
    .col-product:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }
    
    .col-product:nth-child(3) {
        grid-column: 3;
        grid-row: 1;
    }
    
    /* Second row - products 4, 5, 6 */
    .col-product:nth-child(4) {
        grid-column: 1;
        grid-row: 2;
    }
    
    .col-product:nth-child(5) {
        grid-column: 2;
        grid-row: 2;
    }
    
    .col-product:nth-child(6) {
        grid-column: 3;
        grid-row: 2;
    }
}

/* Product column base styles */
.col-product {
    padding: 0 15px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}



/* Tablet layout - 2 products per row (3 rows total) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .products-grid {
        display: flex;
        flex-wrap: wrap;
        margin: 0 -15px;
    }
    
    .col-product {
        flex: 0 0 50%;
        max-width: 50%;
        padding: 0 15px;
        margin-bottom: 30px;
    }
}

/* Mobile layout - 1 product per row */
@media (max-width: 767.98px) {
    .products-grid {
        display: flex;
        flex-wrap: wrap;
        margin: 0 -10px;
    }
    
    .col-product {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 10px;
        margin-bottom: 20px;
    }
}

/* ===================================
   Service Cards Improvements
   =================================== */

.wrd-service-box-wrapper {
    margin-top: 50px;
}

/* Ensure all service items have equal height */
.wrd-service-item {
    height: 100%;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.wrd-service-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

/* Fixed image dimensions */
.wrd-service-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    flex-shrink: 0;
    transition: transform 0.5s ease;
}

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

/* Content wrapper - fills remaining space */
.wrd-service-box-content-wrapper {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    width: 100% !important;
    height: auto !important;
    transform: none !important;
    background: var(--white) !important;
    padding: 30px 25px !important;
    display: flex !important;
    flex-direction: column;
    text-align: center;
    flex-grow: 1;
    z-index: 2;
}

.wrd-service-box-content {
    display: flex !important;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
}

/* Icon and title styling */
.wrd-service-icon-title {
    transform: none !important;
    margin-bottom: 20px;
    transition: none !important;
}

.wrd-service-item:hover .wrd-service-icon-title {
    transform: none !important;
}

.wrd-service-icon {
    font-size: 40px;
    color: var(--primary-green);
    margin-bottom: 15px;
    height: auto;
    width: auto;
    line-height: 1;
    display: inline-block;
    transition: color 0.3s ease;
}

.wrd-service-item:hover .wrd-service-icon {
    color: var(--secondary-green);
}

.wrd-service-title {
    color: var(--primary-green);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.wrd-service-item:hover .wrd-service-title {
    color: var(--secondary-green);
}

/* Text content */
.wrd-service-box-content p {
    color: var(--light-text);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Hide the arrow button as it's redundant */
.wrd-service-details {
    display: none !important;
}

/* Remove overlay effect */
.wrd-service-item::before {
    display: none;
}

/* Mobile adjustments */
@media (max-width: 767.98px) {
    .wrd-service-item {
        min-height: 450px;
    }
    
    .wrd-service-item img {
        height: 200px;
    }
    
    .wrd-service-box-content-wrapper {
        padding: 25px 20px !important;
    }
    
    .wrd-service-title {
        font-size: 1.2rem;
    }
    
    .wrd-service-box-content p {
        font-size: 0.9rem;
    }
}

/* ===================================
   Tab Enhancements
   =================================== */
.wrd-tabs-wrapper .nav-tabs {
    border: none;
    gap: 10px;
}

.wrd-tabs-wrapper .nav-tabs li a {
    border: 2px solid var(--light-bg);
    border-radius: 15px;
    padding: 20px;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.wrd-tabs-wrapper .nav-tabs li a:hover,
.wrd-tabs-wrapper .nav-tabs li a.active {
    border-color: var(--accent-green);
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.wrd-tabs-wrapper .nav-tabs li a.active .wrd-tab-icon-wrapper i,
.wrd-tabs-wrapper .nav-tabs li a:hover .wrd-tab-icon-wrapper i {
    color: var(--white);
}

.wrd-tab-counter-box {
    background: var(--white);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.wrd-tab-counter-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    color: var(--white);
}

.wrd-tab-counter-box:hover .wrd-count-number,
.wrd-tab-counter-box:hover .wrd-count-unit,
.wrd-tab-counter-box:hover .wrd-count-title {
    color: var(--white);
}

/* ===================================
   Slider Enhancements
   =================================== */
.wrd-home-slider-area {
    position: relative;
    overflow: hidden;
}

.wrd-single-slide-item {
    min-height: 600px;
    display: flex;
    align-items: center;
    position: relative;
}

.wrd-single-slide-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(45, 80, 22, 0.7), rgba(74, 124, 44, 0.5));
    z-index: 1;
}

.wrd-slider-content-wrapper {
    position: relative;
    z-index: 2;
}

.wrd-slide-title h2 {
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.wrd-slider-content-text p {
    color: var(--white);
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===================================
   Section Spacing
   =================================== */
section {
    padding: 80px 0;
}

/* Service Section Enhancements */
.service-section {
    background-color: #f4f5ef;
    position: relative;
    overflow: hidden;
    padding: 100px 0 85px;
}

.service-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(244, 245, 239, 0.9));
    z-index: 1;
}

.service-section .container {
    position: relative;
    z-index: 2;
}

.wrd-service-section-image-one,
.wrd-service-section-image-two {
    opacity: 0.8;
    filter: brightness(1.1);
    z-index: 1;
    position: absolute;
}

.wrd-service-section-image-one img,
.wrd-service-section-image-two img {
    position: absolute;
    max-width: 220px;
    height: auto;
}

.wrd-service-section-image-one img {
    top: 115px;
    left: 2%;
}

.wrd-service-section-image-two img {
    right: 5%;
    bottom: 100px;
}

.wrd-section-title-wrapper {
    position: relative;
    z-index: 10;
    margin-bottom: 70px;
    /* Removed background, padding, border-radius, and box-shadow */
}


/* Service Section Enhancements */
.service-section {
    background-color: #f4f5ef;
    position: relative;
    overflow: hidden;
    padding: 100px 0 85px;
}

.service-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(244, 245, 239, 0.8));
    z-index: 1;
}

/* Consolidated section title wrapper styles */
.wrd-section-title-wrapper {
    position: relative;
    z-index: 10;
    margin-bottom: 60px;
}

/* Better visibility for section titles on light backgrounds */
#orari .wrd-section-title-wrapper .wrd-section-subtitle,
#contatti .wrd-section-title-wrapper .wrd-section-subtitle {
    color: var(--primary-green) !important;
    font-weight: 700;
}

#orari .wrd-section-title-wrapper .wrd-section-title,
#contatti .wrd-section-title-wrapper .wrd-section-title {
    color: var(--primary-green) !important;
    font-weight: 700;
}

#contatti .wrd-section-title-wrapper p {
    color: var(--dark-text) !important;
    font-weight: 500;
}

.wrd-section-title {
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    position: relative;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.wrd-section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
    border-radius: 3px;
}

.wrd-section-subtitle {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 1.2rem;
    display: block;
    margin-bottom: 15px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
    position: relative;
    letter-spacing: 1px;
}

.wrd-section-subtitle::before {
    content: '#';
    margin-right: 8px;
    color: var(--accent-green);
    font-weight: 700;
}


.wrd-section-subtitle {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 10px;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
}

.wrd-section-subtitle {
    color: var(--accent-green);
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    margin-bottom: 10px;
}

.wrd-section-title {
    color: var(--primary-green);
    font-weight: 700;
    margin-bottom: 20px;
}

/* ===================================
   Contact Section
   =================================== */
.contact-info-box {
    transition: all 0.3s ease;
}

.contact-info-box:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.contact-info-box i {
    transition: all 0.3s ease;
}

.contact-info-box:hover i {
    transform: scale(1.1) rotate(5deg);
}

/* ===================================
   Footer Enhancements
   =================================== */
.footer-area {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-green));
}

.footer-widget h3 {
    color: var(--white);
    position: relative;
    padding-bottom: 15px;
}

.footer-widget h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--accent-green);
}

.footer-widget ul li a {
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-widget ul li a:hover {
    color: var(--white) !important;
    transform: translateX(5px);
}

/* ===================================
   Animation Classes
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-on-scroll {
    animation: fadeInUp 0.8s ease-out;
}

/* ===================================
   Responsive Enhancements
   =================================== */
@media (max-width: 991px) {
    section {
        padding: 60px 0;
    }

    .wrd-section-title-wrapper {
        margin-bottom: 40px;
    }

    .wrd-single-slide-item {
        min-height: 500px;
    }
}

@media (max-width: 767px) {
    section {
        padding: 40px 0;
    }

    .wrd-section-title-wrapper {
        margin-bottom: 30px;
    }

    .wrd-single-slide-item {
        min-height: 400px;
    }

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

/* ===================================
   Performance Optimizations
   =================================== */
/* Use GPU acceleration for transforms */
.wrd-service-item,
.wrd-tab-counter-box,
.contact-info-box,
.wrd-button {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Optimize images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===================================
   Accessibility Improvements
   =================================== */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    left: -9999px;
    z-index: 999;
    padding: 1em;
    background-color: var(--primary-green);
    color: var(--white);
    text-decoration: none;
}

.skip-to-main:focus {
    left: 50%;
    transform: translateX(-50%);
}

/* ===================================
   Print Styles
   =================================== */
@media print {

    .header-top-area,
    .mobile-menu-container,
    .toggle-bg,
    .header-buttons-area,
    .slider-button-wrapper,
    .footer-area {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    h1,
    h2,
    h3 {
        page-break-after: avoid;
    }

    img {
        max-width: 100% !important;
    }
}

/* ===================================
   Fix for Product Cards Layout
   =================================== */



/* ===================================
   Back to Top Button
   =================================== */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-green);
    color: var(--white);
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 20px;
    z-index: 9999;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

.back-to-top-btn:hover {
    background: var(--secondary-green);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}