/**
 * Layout Fixes - Pamasoft Website
 * Fix spacing, CTA, immagini e layout issues
 */

/* ===================================
   SERVICE CARDS - Fix Spacing & Layout
   =================================== */

.service-card {
    display: flex;
    flex-direction: column;
    min-height: 350px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card .service-icon,
.service-card i.service-icon {
    margin-bottom: 24px;
    color: var(--primary_color);
}

.service-card h3 {
    margin-bottom: 16px !important;
    line-height: 1.3 !important;
}

.service-card p {
    margin-bottom: 20px;
    line-height: 1.6 !important;
    flex-grow: 1;
}

/* Fix per bottoni nelle service card */
.service-card .theme-btn {
    margin-top: auto;
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* ===================================
   BUTTONS GROUP - Fix Spacing
   =================================== */

.btns-group {
    gap: 16px !important;
    flex-wrap: wrap;
    margin-top: 24px;
}

.btns-group .theme-btn,
.btns-group .theme-btn2 {
    margin: 0 !important;
}

/* ===================================
   CONTACT AREA - Fix Layout & Spacing
   =================================== */

.contact-area .custom-row {
    gap: 40px !important;
    align-items: stretch;
}

.contact-area .contact-form-wrap {
    flex: 1;
    min-width: 0;
}

.contact-area .contact-experience {
    flex: 0 0 auto;
    width: 100%;
    max-width: 420px;
    display: flex;
    align-items: center;
}

.contact-area .contact-form-wrap .contact-form-body .btns-group {
    margin-top: 32px;
}

/* Fix spacing tra elementi form */
.contact-form .input-row {
    margin-bottom: 24px;
}

.contact-form .input-row:last-of-type {
    margin-bottom: 0;
}

/* ===================================
   IMAGES - Fix Dimensioni
   =================================== */

.right-content img,
.left-content img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 10px;
}

/* ===================================
   SECTIONS - Fix Padding & Spacing
   =================================== */

/* Riduzione spacing carosello */
.client-area {
    padding: 40px 0 !important;
}

/* ===================================
   CHI SIAMO - Fix Spacing
   =================================== */

.about-details-area .custom-row {
    gap: 60px;
    align-items: center;
}

.about-details-area .col-md-6 {
    flex: 1;
}

/* Fix spacing liste about */
.about-area .left-content ul,
.about-area .right-content ul {
    margin-top: 24px;
    margin-bottom: 32px;
}

.about-area .left-content ul li,
.about-area .right-content ul li {
    margin-bottom: 16px;
}

.about-area .left-content ul li:last-child,
.about-area .right-content ul li:last-child {
    margin-bottom: 0;
}

/* Fix spacing bottoni about */
.about-area .left-content .theme-btn,
.about-area .right-content .theme-btn {
    margin-top: 32px;
}

/* ===================================
   SERVIZI - Fix Card Grid
   =================================== */

.services-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-body .custom-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

/* ===================================
   PORTFOLIO CARDS - Fix Spacing
   =================================== */

/* Grid per portfolio cards */
.service-area .custom-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.portfolio-card {
    margin-bottom: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.portfolio-card .portfolio-img {
    position: relative;
    overflow: hidden;
    border-radius: 10px 10px 0 0;
    height: 250px;
}

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

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

.portfolio-card .portfolio-content {
    padding: 24px;
    background: white;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.portfolio-card .portfolio-content h3 {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}

.portfolio-card .portfolio-content p {
    margin-bottom: 16px;
    color: #666;
    line-height: 1.6;
}

.portfolio-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.portfolio-stats span {
    background: var(--primary_light);
    color: var(--primary_color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ===================================
   HOW WE DO CARDS - Fix Spacing
   =================================== */

.how-we-do-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.how-we-do-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.how-we-do-card .icon {
    margin-bottom: 20px;
    font-size: 32px;
    color: var(--primary_color);
}

.how-we-do-card h3 {
    margin-bottom: 12px;
    font-size: 20px;
    font-weight: 600;
}

.how-we-do-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ===================================
   RESPONSIVE FIXES
   =================================== */

@media (max-width: 991px) {
    .contact-area .custom-row {
        flex-direction: column;
    }
    
    .contact-area .contact-experience {
        max-width: 100%;
        width: 100%;
    }
    
    .about-area .custom-row {
        flex-direction: column;
        gap: 40px;
    }
    
    .services-list {
        grid-template-columns: 1fr;
    }
    
    .service-body .custom-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    
    .service-card {
        padding: 40px 24px;
        min-height: auto;
    }
    
    .btns-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btns-group .theme-btn,
    .btns-group .theme-btn2 {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .portfolio-card .portfolio-img {
        height: 200px;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.modern-section {
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
}

/* Grid utilities */
.col-lg-4 {
    flex: 0 0 33.333%;
    max-width: 33.333%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (max-width: 991px) {
    .col-lg-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .col-lg-4,
    .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
