/*
Theme Name: Lonato SPA Theme
Theme URI: https://lonatospa.it
Description: Tema personalizzato per Lonato SPA - Logistica Ferroviaria e Intermodale
Author: Lonato SPA
Author URI: https://lonatospa.it
Template: hello-elementor
Version: 1.8.3
Text Domain: lonato-theme
*/

/* ========================================
   CSS VARIABLES - Colori Lonato SPA
   ======================================== */
:root {
    --color-blue-dark: #1B3A6D;
    --color-blue: #2E5AAC;
    --color-blue-light: #4A7DD4;
    --color-orange: #F5841F;
    --color-orange-light: #FF9A3D;
    --color-red: #E53935;
    --color-white: #FFFFFF;
    --color-gray-100: #F5F7FA;
    --color-gray-200: #E8ECF1;
    --color-gray-300: #CDD4DE;
    --color-gray-400: #9AA5B8;
    --color-gray-500: #6B7A90;
    --color-gray-600: #4A5568;
    --color-gray-700: #2D3748;
    --color-gray-800: #1A202C;
    --color-gray-900: #0D1117;
    --gradient-primary: linear-gradient(135deg, #1B3A6D 0%, #2E5AAC 100%);
    --gradient-accent: linear-gradient(135deg, #F5841F 0%, #E53935 100%);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --shadow-xl: 0 20px 50px rgba(0,0,0,0.15);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
}

/* ========================================
   BASE STYLES (Mobile First)
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
}

html,
body,
.site-header,
.site-footer {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-gray-700);
    background-color: var(--color-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.menu-open {
    overflow: hidden;
}

a {
    color: var(--color-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-blue-dark);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-gray-800);
    font-weight: 700;
    line-height: 1.2;
}

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

/* ========================================
   BUTTONS (Mobile First)
   ======================================== */
.btn,
.elementor-button,
.wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    font-family: var(--font-family);
    font-size: 14px;
    font-weight: 600;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary,
.elementor-button-primary {
    background: var(--gradient-primary);
    color: var(--color-white) !important;
    border-color: var(--color-blue-dark);
}

.btn-primary:hover,
.elementor-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-accent {
    background: var(--gradient-accent);
    color: var(--color-white) !important;
}

.btn-outline {
    background: transparent;
    color: var(--color-blue-dark);
    border-color: var(--color-blue-dark);
}

.btn-outline:hover {
    background: var(--color-blue-dark);
    color: var(--color-white);
}

.btn-lg {
    padding: 16px 28px;
    font-size: 15px;
}

/* Desktop buttons */
@media (min-width: 768px) {
    .btn,
    .elementor-button,
    .wp-block-button__link {
        padding: 14px 28px;
        font-size: 15px;
        gap: 10px;
    }

    .btn-lg {
        padding: 18px 36px;
        font-size: 16px;
    }
}

/* ========================================
   HEADER (Mobile First)
   ======================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--color-white);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.header-inner {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 16px;
    display: flex;
}

.site-header .nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 5px 0;
    width: 100%;
}

.site-header .logo img {
    height: 55px;
    width: auto;
}

/* Mobile: Navigation hidden by default */
.main-navigation {
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-white);
    padding: 20px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
}

.main-navigation.active {
    transform: translateX(0);
}

.main-navigation .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-navigation .nav-menu > li {
    border-bottom: 1px solid var(--color-gray-200);
}

.main-navigation .nav-menu > li:last-child {
    border-bottom: none;
}

.main-navigation a {
    display: block;
    padding: 16px 0;
    font-size: 16px;
    font-weight: 500;
    color: var(--color-gray-700);
    transition: all 0.2s ease;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    color: var(--color-orange);
}

/* Mobile Submenu */
.main-navigation .sub-menu {
    display: none;
    list-style: none;
    padding: 0 0 0 20px;
    margin: 0;
    background: var(--color-gray-100);
    border-radius: var(--radius-sm);
}

.main-navigation .menu-item-has-children.active > .sub-menu {
    display: block;
}

.main-navigation .sub-menu li {
    border-bottom: none;
}

.main-navigation .sub-menu a {
    padding: 12px 16px;
    font-size: 15px;
    color: var(--color-gray-600);
}

.main-navigation .sub-menu a:hover {
    color: var(--color-blue);
    background: var(--color-gray-200);
}

/* Mobile: Arrow for submenus */
.main-navigation .menu-item-has-children > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-navigation .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid currentColor;
    opacity: 0.6;
    transition: transform 0.3s;
}

.main-navigation .menu-item-has-children.active > a::after {
    transform: rotate(180deg);
}

/* Nav Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.nav-actions .btn {
    display: none;
}

/* Mobile Toggle */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background 0.3s;
    margin-right: 0;
}

.mobile-toggle:hover {
    background: var(--color-gray-100);
}

.mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-gray-700);
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

/* Desktop Header */
@media (min-width: 768px) {
    .header-inner {
        padding: 0 24px;
    }

    .site-header .nav {
        padding: 8px 0;
    }

    .site-header .logo img {
        height: 75px;
    }

    .main-navigation {
        position: static;
        transform: none;
        background: transparent;
        padding: 0;
        overflow: visible;
        margin : 0 auto;
    }

    .main-navigation .nav-menu {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }

    .main-navigation .nav-menu > li {
        border-bottom: none;
    }

    .main-navigation a {
        padding: 10px 18px;
        font-size: 15px;
        border-radius: var(--radius-sm);
    }

    /* Desktop Submenu */
    .main-navigation .sub-menu {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 250px;
        background: var(--color-white);
        box-shadow: var(--shadow-lg);
        border-radius: var(--radius-md);
        padding: 12px 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
        z-index: 100;
    }

    .main-navigation .menu-item-has-children {
        position: relative;
    }

    .main-navigation li:hover > .sub-menu,
    .main-navigation .menu-item-has-children.active > .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-navigation .sub-menu li {
        width: 100%;
    }

    .main-navigation .sub-menu a {
        display: block;
        padding: 12px 24px;
        white-space: nowrap;
        background: transparent;
    }

    .main-navigation .sub-menu a:hover {
        background: var(--color-gray-100);
    }

    .main-navigation .menu-item-has-children > a::after {
        margin-left: 8px;
        vertical-align: middle;
    }

    .main-navigation .menu-item-has-children > a {
        display: inline-flex;
    }

    .nav-actions {
        margin-left: 20px;
    }

    .nav-actions .btn {
        display: inline-flex;
    }

    .mobile-toggle {
        display: none;
    }
}

/* ========================================
   PAGE HERO (Mobile First)
   ======================================== */
.page-hero {
    position: relative;
    padding: 100px 0 60px;
    background: var(--gradient-primary);
    overflow: hidden;
    margin-top: 65px;
}

@media (min-width: 768px) {
    .page-hero {
        margin-top: 91px;
    }
}

.page-hero-bg {
    position: absolute;
    inset: 0;
}

.page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
}

.page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 16px;
}

.page-hero h1 {
    color: var(--color-white);
    font-size: 1.75rem;
    margin-bottom: 12px;
}

.page-hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.85);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 13px;
}

.breadcrumb a {
    color: rgba(255,255,255,0.7);
}

.breadcrumb a:hover {
    color: var(--color-white);
}

.breadcrumb .current {
    color: var(--color-orange);
}

.breadcrumb .sep {
    color: rgba(255,255,255,0.4);
}

/* Desktop Hero */
@media (min-width: 768px) {
    .page-hero {
        padding: 160px 0 80px;
        margin-top: 75px;
    }

    .page-hero-content {
        padding: 0 24px;
    }

    .page-hero h1 {
        font-size: clamp(2rem, 5vw, 3.5rem);
        margin-bottom: 16px;
    }

    .page-hero p {
        font-size: 1.25rem;
    }

    .breadcrumb {
        gap: 12px;
        margin-bottom: 24px;
        font-size: 14px;
    }
}

/* ========================================
   SECTIONS (Mobile First)
   ======================================== */
.section {
    padding: 60px 0;
}

.section-light {
    background: var(--color-gray-100);
}

.section-dark {
    background: var(--gradient-primary);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 0 16px;
}

.section-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(46, 90, 172, 0.1);
    color: var(--color-blue);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius-xl);
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--color-gray-500);
    max-width: 700px;
    margin: 0 auto;
}

.text-primary {
    color: var(--color-blue);
}

.text-accent {
    color: var(--color-orange);
}

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Desktop Sections */
@media (min-width: 768px) {
    .section {
        padding: 100px 0;
    }

    .section-header {
        margin-bottom: 60px;
    }

    .section-badge {
        padding: 8px 20px;
        font-size: 13px;
        margin-bottom: 20px;
    }

    .section-title {
        font-size: clamp(2rem, 4vw, 3rem);
        margin-bottom: 20px;
    }

    .section-subtitle {
        font-size: 1.125rem;
    }
}

/* ========================================
   SERVICE CARDS (Mobile First)
   ======================================== */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.service-card {
    display: block;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-decoration: none;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.service-card-img {
    height: 180px;
    overflow: hidden;
}

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

.service-card:hover .service-card-img img {
    transform: scale(1.1);
}

.service-card-content {
    padding: 20px;
}

.service-card-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.service-card-icon i {
    font-size: 20px;
    color: var(--color-white);
}

.service-card h3 {
    margin-bottom: 10px;
    font-size: 1.125rem;
}

.service-card p {
    color: var(--color-gray-500);
    margin-bottom: 16px;
    font-size: 14px;
}

.service-card .btn {
    padding: 10px 20px;
    font-size: 13px;
}

/* Tablet Services Grid */
@media (min-width: 600px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Services Grid */
@media (min-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
        gap: 30px;
        padding: 0 24px;
    }

    .service-card-img {
        height: 220px;
    }

    .service-card-content {
        padding: 30px;
    }

    .service-card-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }

    .service-card-icon i {
        font-size: 24px;
    }

    .service-card h3 {
        margin-bottom: 12px;
        font-size: 1.25rem;
    }

    .service-card p {
        margin-bottom: 20px;
        font-size: 15px;
    }

    .service-card .btn {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ========================================
   SERVICE DETAIL PAGE (Mobile First)
   ======================================== */
.service-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.service-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    align-items: center;
    margin-bottom: 40px;
}

.service-detail-img {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.service-detail-img img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.service-detail-content h2 {
    margin-bottom: 16px;
    font-size: 1.25rem;
}

.service-detail-content p {
    color: var(--color-gray-600);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.service-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 0;
    color: var(--color-gray-600);
    font-size: 14px;
}

.service-features li i {
    color: var(--color-orange);
    font-size: 12px;
    margin-top: 4px;
}

/* Desktop Service Detail */
@media (min-width: 768px) {
    .service-detail {
        padding: 0 24px;
    }

    .service-detail-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
        margin-bottom: 60px;
    }

    .service-detail-grid.reverse {
        direction: rtl;
    }

    .service-detail-grid.reverse > * {
        direction: ltr;
    }

    .service-detail-img img {
        height: 400px;
    }

    .service-detail-content h2 {
        margin-bottom: 20px;
        font-size: 1.5rem;
    }

    .service-detail-content p {
        font-size: 1.1rem;
        line-height: 1.8;
        margin-bottom: 24px;
    }

    .service-features li {
        gap: 12px;
        padding: 10px 0;
        font-size: 15px;
    }

    .service-features li i {
        font-size: 14px;
    }
}

/* ========================================
   KPI CARDS (Mobile First - 1 colonna)
   ======================================== */
.kpi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.kpi-card {
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    padding: 24px 16px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.kpi-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-gray-100);
    border-radius: 50%;
    margin: 0 auto 16px;
}

.kpi-icon i {
    font-size: 20px;
    color: var(--color-blue);
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-gray-800);
    line-height: 1;
    margin-bottom: 6px;
}

.kpi-label {
    font-size: 13px;
    color: var(--color-gray-500);
}

/* Small Mobile KPI - 2 columns */
@media (min-width: 480px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet KPI - 3 columns */
@media (min-width: 768px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .kpi-card {
        padding: 30px 24px;
    }

    .kpi-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }

    .kpi-icon i {
        font-size: 24px;
    }

    .kpi-value {
        font-size: 2.5rem;
        margin-bottom: 8px;
    }

    .kpi-label {
        font-size: 14px;
    }
}

/* Desktop KPI - 4 columns */
@media (min-width: 992px) {
    .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 30px;
    }

    /* Homepage KPI - 4 columns centered (4 KPIs) */
    .section-numeri .kpi-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }

    .kpi-card {
        padding: 40px 30px;
    }

    .kpi-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 24px;
    }

    .kpi-icon i {
        font-size: 28px;
    }

    .kpi-value {
        font-size: 3rem;
    }

    .kpi-label {
        font-size: 15px;
    }
}

/* KPI Card Green Variant - for eco/sustainability KPIs (CO2 evitate) */
.kpi-card:has(.fa-leaf),
.kpi-card:has(.fa-tree),
.kpi-card:has(.fa-seedling) {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border: 1px solid #A5D6A7;
}

.kpi-card:has(.fa-leaf) .kpi-icon,
.kpi-card:has(.fa-tree) .kpi-icon,
.kpi-card:has(.fa-seedling) .kpi-icon {
    background: linear-gradient(135deg, #43A047 0%, #66BB6A 100%);
}

.kpi-card:has(.fa-leaf) .kpi-icon i,
.kpi-card:has(.fa-tree) .kpi-icon i,
.kpi-card:has(.fa-seedling) .kpi-icon i {
    color: #fff;
}

.kpi-card:has(.fa-leaf) .kpi-value,
.kpi-card:has(.fa-tree) .kpi-value,
.kpi-card:has(.fa-seedling) .kpi-value {
    color: #2E7D32;
}

.kpi-card:has(.fa-leaf) .kpi-label,
.kpi-card:has(.fa-tree) .kpi-label,
.kpi-card:has(.fa-seedling) .kpi-label {
    color: #388E3C;
}

/* CO2 Card Extra Info */
.kpi-co2-info {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed #A5D6A7;
    text-align: center;
}

.kpi-co2-subtitle {
    display: block;
    font-size: 12px;
    color: #388E3C;
    font-weight: 500;
    margin-bottom: 8px;
}

.kpi-co2-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    color: #2E7D32;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.kpi-co2-link:hover {
    background: rgba(46, 125, 50, 0.1);
    color: #1B5E20;
}

.kpi-co2-link i {
    font-size: 14px;
}

/* CO2 Modal */
.co2-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.co2-modal.active {
    opacity: 1;
    visibility: visible;
}

.co2-modal-content {
    background: #fff;
    border-radius: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

.co2-modal.active .co2-modal-content {
    transform: scale(1) translateY(0);
}

.co2-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: #f1f5f9;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 18px;
    transition: all 0.2s ease;
    z-index: 1;
}

.co2-modal-close:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.co2-modal-header {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    padding: 40px 32px 32px;
    text-align: center;
    border-radius: 24px 24px 0 0;
}

.co2-modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #43A047 0%, #66BB6A 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(67, 160, 71, 0.3);
}

.co2-modal-header h3 {
    color: #1B5E20;
    font-size: 1.5rem;
    margin: 0;
    font-weight: 700;
}

.co2-modal-body {
    padding: 32px;
}

.co2-modal-intro {
    color: #4A5568;
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 28px;
    text-align: center;
}

.co2-comparison {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.co2-comparison-item {
    background: #f8fafc;
    padding: 24px;
    border-radius: 16px;
    text-align: center;
    flex: 1;
    min-width: 140px;
}

.co2-comparison-item.co2-train {
    border: 2px solid #43A047;
    background: linear-gradient(135deg, #E8F5E9 0%, #fff 100%);
}

.co2-comparison-item.co2-trucks {
    border: 2px solid #e2e8f0;
}

.co2-comparison-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.co2-comparison-label {
    font-weight: 700;
    color: #1e293b;
    font-size: 15px;
    margin-bottom: 4px;
}

.co2-comparison-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: #43A047;
}

.co2-trucks .co2-comparison-value {
    color: #64748b;
}

.co2-comparison-desc {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}

.co2-comparison-vs {
    font-size: 24px;
    font-weight: 700;
    color: #94a3b8;
}

.co2-formula {
    background: #f8fafc;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.co2-formula h4 {
    color: #1e293b;
    font-size: 15px;
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.co2-formula h4 i {
    color: #43A047;
}

.co2-formula ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.co2-formula li {
    color: #4A5568;
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    line-height: 1.6;
}

.co2-formula li:last-child {
    border-bottom: none;
}

.co2-formula li strong {
    color: #1e293b;
}

.co2-result {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 2px solid #A5D6A7;
}

.co2-result-icon {
    font-size: 40px;
    flex-shrink: 0;
}

.co2-result-text {
    color: #1B5E20;
    font-size: 15px;
    line-height: 1.6;
}

.co2-result-text strong {
    color: #2E7D32;
}

.co2-modal-footer {
    padding: 24px 32px 32px;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

/* CO2 Modal Responsive */
@media (max-width: 600px) {
    .co2-modal-content {
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
        margin-top: auto;
    }

    .co2-modal-header {
        padding: 32px 24px 24px;
    }

    .co2-modal-header h3 {
        font-size: 1.25rem;
    }

    .co2-modal-body {
        padding: 24px;
    }

    .co2-comparison {
        flex-direction: column;
    }

    .co2-comparison-vs {
        transform: rotate(90deg);
    }

    .co2-comparison-item {
        width: 100%;
    }

    .co2-result {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   CERTIFICATIONS (Mobile First)
   ======================================== */
.cert-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.cert-card {
    background: var(--color-white);
    padding: 30px 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-gray-200);
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-blue);
}

.cert-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    margin: 0 auto 20px;
}

.cert-icon i {
    font-size: 24px;
    color: var(--color-white);
}

/* Tablet Certifications */
@media (min-width: 600px) {
    .cert-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop Certifications */
@media (min-width: 768px) {
    .cert-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
        padding: 0 24px;
    }

    .cert-card {
        padding: 40px 30px;
    }

    .cert-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 24px;
    }

    .cert-icon i {
        font-size: 32px;
    }
}

/* ========================================
   CONTACT (Mobile First)
   ======================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-gray-200);
}

.contact-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.contact-icon i {
    font-size: 18px;
    color: var(--color-white);
}

.contact-form-wrapper {
    background: var(--color-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-gray-200);
}

/* Desktop Contact */
@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1.3fr;
        gap: 60px;
        padding: 0 24px;
    }

    .contact-info {
        gap: 20px;
    }

    .contact-card {
        gap: 20px;
        padding: 24px;
    }

    .contact-icon {
        width: 55px;
        height: 55px;
    }

    .contact-icon i {
        font-size: 22px;
    }

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

/* ========================================
   FOOTER (Mobile First)
   ======================================== */
.site-footer {
    background: var(--color-gray-900);
    padding: 50px 0 0;
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 16px 40px !important;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.footer-logo {
    height: 35px;
    margin-bottom: 16px;
}

.footer-brand p {
    color: rgba(255,255,255,0.6);
    margin-bottom: 20px;
    line-height: 1.7;
    font-size: 14px;
}

.footer-col h4 {
    color: var(--color-white);
    margin-bottom: 20px;
    font-size: 1rem;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
}

.footer-col ul a:hover {
    color: var(--color-orange);
}

.footer-social {
    display: flex;
    gap: 10px;
    justify-content: center;
}

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

.footer-social a:hover {
    background: var(--color-orange);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.footer-contact li i {
    color: var(--color-orange);
    width: 16px;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 20px 16px !important;
    color: rgba(255,255,255,0.4);
    font-size: 13px;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

.footer-links a {
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

.footer-links a:hover {
    color: var(--color-white);
}

/* Tablet Footer */
@media (min-width: 600px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
    }

    .footer-social {
        justify-content: flex-start;
    }

    .footer-contact li {
        justify-content: flex-start;
    }
}

/* Desktop Footer */
@media (min-width: 768px) {
    .site-footer {
        padding: 80px 0 0;
    }

    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 40px;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 24px 60px !important;
    }

    .footer-logo {
        height: 40px;
        margin-bottom: 20px;
    }

    .footer-brand p {
        margin-bottom: 24px;
        line-height: 1.8;
        font-size: 15px;
    }

    .footer-col h4 {
        margin-bottom: 24px;
    }

    .footer-col ul li {
        margin-bottom: 12px;
    }

    .footer-col ul a {
        font-size: 15px;
    }

    .footer-social {
        gap: 12px;
    }

    .footer-social a {
        width: 40px;
        height: 40px;
    }

    .footer-contact li {
        gap: 12px;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 24px !important;
        font-size: 14px;
    }

    .footer-links {
        gap: 24px;
    }

    .footer-links a {
        font-size: 14px;
    }
}

/* ========================================
   BEATRICE ASSISTANT (Mobile First)
   ======================================== */
.beatrice-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.beatrice-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 10px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-xl);
    color: var(--color-white);
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
}

.beatrice-toggle:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 60px rgba(27,58,109,0.4);
}

.beatrice-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.3);
}

.beatrice-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.beatrice-label {
    font-weight: 600;
    font-size: 14px;
}

.beatrice-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: calc(100vw - 40px);
    max-width: 360px;
    max-height: 80vh;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.beatrice-panel.active {
    transform: scale(1) translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Desktop Beatrice */
@media (min-width: 768px) {
    .beatrice-container {
        bottom: 30px;
        right: 30px;
    }

    .beatrice-toggle {
        gap: 12px;
        padding: 12px 20px 12px 12px;
    }

    .beatrice-avatar {
        width: 45px;
        height: 45px;
    }

    .beatrice-label {
        font-size: 15px;
    }

    .beatrice-panel {
        width: 380px;
        bottom: 80px;
    }
}

/* Beatrice Header */
.beatrice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: var(--gradient-primary);
}

.beatrice-header #beatrice-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
}

.beatrice-header #beatrice-close:hover {
    background: rgba(255,255,255,0.25);
}

.beatrice-content {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

@media (min-width: 768px) {
    .beatrice-header {
        padding: 20px;
    }

    .beatrice-header #beatrice-close {
        width: 36px;
        height: 36px;
    }

    .beatrice-content {
        padding: 20px;
        max-height: calc(80vh - 100px);
    }
}

.beatrice-quote {
    text-align: center;
    padding: 14px;
    background: linear-gradient(135deg, rgba(27,58,109,0.05) 0%, rgba(245,132,31,0.05) 100%);
    border-radius: 12px;
    margin-bottom: 14px;
    border-left: 3px solid #F5841F;
}

.beatrice-quote p {
    font-style: italic;
    color: #2D3748;
    font-size: 14px;
    margin: 0 0 4px;
}

.beatrice-quote span {
    font-size: 11px;
    color: #9AA5B8;
}

.beatrice-message {
    padding: 14px;
    background: #F5F7FA;
    border-radius: 12px;
    margin-bottom: 14px;
}

.beatrice-message p {
    margin: 0;
    font-size: 13px;
    color: #2D3748;
    line-height: 1.5;
}

.beatrice-tour-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--gradient-accent);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.3s;
}

.beatrice-tour-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(245,132,31,0.3);
}

.beatrice-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 16px;
}

.beatrice-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #E8ECF1;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #2D3748;
    text-decoration: none;
    transition: all 0.3s;
}

.beatrice-link:hover {
    border-color: #1B3A6D;
    background: #F5F7FA;
    color: #1B3A6D;
}

.beatrice-link i {
    color: #F5841F;
}

.beatrice-faq {
    border-top: 1px solid #E8ECF1;
    padding-top: 14px;
}

.beatrice-faq-title {
    font-size: 12px;
    color: #9AA5B8;
    margin: 0 0 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.beatrice-faq-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #E8ECF1;
    border-radius: 8px;
    font-size: 13px;
    color: #2D3748;
    cursor: pointer;
    margin-bottom: 6px;
    text-align: left;
    transition: all 0.3s;
}

.beatrice-faq-btn:hover {
    background: #F5F7FA;
    border-color: #F5841F;
}

.beatrice-faq-btn i {
    color: #F5841F;
    flex-shrink: 0;
}

.beatrice-back {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: none;
    border: none;
    color: #1B3A6D;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 14px;
}

.beatrice-back:hover {
    color: #F5841F;
}

@media (min-width: 768px) {
    .beatrice-quote {
        padding: 16px;
        margin-bottom: 16px;
    }

    .beatrice-quote p {
        font-size: 15px;
        margin: 0 0 6px;
    }

    .beatrice-quote span {
        font-size: 12px;
    }

    .beatrice-message {
        padding: 16px;
        margin-bottom: 16px;
    }

    .beatrice-message p {
        font-size: 14px;
        line-height: 1.6;
    }

    .beatrice-tour-btn {
        gap: 12px;
        padding: 16px 20px;
        font-size: 15px;
        margin-bottom: 20px;
    }

    .beatrice-links {
        gap: 10px;
        margin-bottom: 20px;
    }

    .beatrice-link {
        gap: 10px;
        padding: 14px 16px;
        font-size: 14px;
    }

    .beatrice-faq {
        padding-top: 16px;
    }

    .beatrice-faq-title {
        font-size: 13px;
        margin: 0 0 12px;
    }

    .beatrice-faq-btn {
        gap: 10px;
        padding: 12px 16px;
        font-size: 14px;
        margin-bottom: 8px;
    }

    .beatrice-back {
        gap: 8px;
        padding: 10px 16px;
        font-size: 14px;
        margin-bottom: 16px;
    }
}

/* ========================================
   TOUR GUIDATO (Mobile First)
   ======================================== */
.tour-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.tour-overlay.active {
    opacity: 1;
    visibility: visible;
}

.tour-highlight {
    position: relative;
    z-index: 9999 !important;
    box-shadow: 0 0 0 4px #F5841F, 0 0 0 8px rgba(245,132,31,0.3) !important;
    border-radius: 8px;
}

.tour-tooltip {
    position: fixed;
    width: calc(100vw - 30px);
    max-width: 340px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.tour-tooltip.active {
    opacity: 1;
    visibility: visible;
}

.tour-tooltip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid #E8ECF1;
}

.tour-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.tour-tooltip-header strong {
    display: block;
    color: #1B3A6D;
    font-size: 14px;
}

.tour-tooltip-header span {
    font-size: 11px;
    color: #9AA5B8;
}

.tour-tooltip p {
    padding: 16px;
    margin: 0;
    font-size: 14px;
    color: #2D3748;
    line-height: 1.6;
}

.tour-tooltip-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-top: 1px solid #E8ECF1;
    background: #F5F7FA;
    border-radius: 0 0 16px 16px;
}

.tour-btn-skip {
    background: none;
    border: none;
    color: #9AA5B8;
    font-size: 13px;
    cursor: pointer;
}

.tour-btn-skip:hover {
    color: #E53935;
}

.tour-btn-prev,
.tour-btn-next {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.tour-btn-prev {
    background: #E8ECF1;
    color: #4A5568;
    margin-right: 6px;
}

.tour-btn-prev:hover {
    background: #CDD4DE;
}

.tour-btn-next {
    background: var(--gradient-primary);
    color: #fff;
}

.tour-btn-next:hover {
    box-shadow: 0 5px 20px rgba(27,58,109,0.3);
}

.tour-btn-prev:disabled,
.tour-btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (min-width: 768px) {
    .tour-tooltip {
        width: 340px;
    }

    .tour-tooltip-header {
        gap: 12px;
        padding: 16px 20px;
    }

    .tour-avatar {
        width: 40px;
        height: 40px;
    }

    .tour-tooltip-header strong {
        font-size: 15px;
    }

    .tour-tooltip-header span {
        font-size: 12px;
    }

    .tour-tooltip p {
        padding: 20px;
        font-size: 15px;
        line-height: 1.7;
    }

    .tour-tooltip-actions {
        padding: 16px 20px;
    }

    .tour-btn-skip {
        font-size: 14px;
    }

    .tour-btn-prev,
    .tour-btn-next {
        padding: 10px 20px;
        font-size: 14px;
    }

    .tour-btn-prev {
        margin-right: 8px;
    }
}

/* ========================================
   CTA BANNER (Mobile First)
   ======================================== */
.cta-banner {
    position: relative;
    padding: 60px 0;
    overflow: hidden;
}

.cta-banner-bg {
    position: absolute;
    inset: 0;
}

.cta-banner-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-banner-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(27, 58, 109, 0.95) 0%, rgba(245, 132, 31, 0.85) 100%);
}

.cta-banner-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 16px;
}

.cta-banner-content h2 {
    color: var(--color-white);
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.cta-banner-content p {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    margin-bottom: 24px;
}

.cta-banner-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.cta-banner-actions .btn {
    width: 100%;
}

@media (min-width: 768px) {
    .cta-banner {
        padding: 100px 0;
    }

    .cta-banner-content {
        padding: 0 24px;
    }

    .cta-banner-content h2 {
        margin-bottom: 16px;
        font-size: 2rem;
    }

    .cta-banner-content p {
        font-size: 1.125rem;
        margin-bottom: 30px;
    }

    .cta-banner-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
    }

    .cta-banner-actions .btn {
        width: auto;
    }
}

/* ========================================
   SERVICES GRID FULL (Mobile First)
   ======================================== */
.services-grid-full {
    padding: 0;
}

@media (min-width: 992px) {
    .services-grid-full {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

.hidden-mobile {
    display: none !important;
}

.hidden-desktop {
    display: block !important;
}

@media (min-width: 768px) {
    .hidden-mobile {
        display: block !important;
    }

    .hidden-desktop {
        display: none !important;
    }
}

/* ========================================
   FORM STYLES (Mobile First)
   ======================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 15px;
    color: var(--color-gray-700);
    background: var(--color-white);
    transition: border-color 0.3s, box-shadow 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-blue);
    box-shadow: 0 0 0 3px rgba(46, 90, 172, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--color-gray-700);
    font-size: 14px;
}

@media (min-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="password"],
    input[type="number"],
    textarea,
    select {
        padding: 14px 16px;
    }

    label {
        margin-bottom: 8px;
        font-size: 15px;
    }
}

/* ========================================
   PAGE SPECIFIC - Contatti form grid
   ======================================== */
.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 600px) {
    .contact-form-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* ========================================
   SCROLLBAR STYLING
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-gray-500);
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

/* ========================================
   LANGUAGE SWITCHER (Mobile First)
   ======================================== */
.lang-switcher {
    position: relative;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--color-gray-100);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 500;
    color: var(--color-gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
}

.lang-current:hover {
    background: var(--color-gray-200);
    border-color: var(--color-gray-300);
}

.lang-current i {
    font-size: 10px;
    opacity: 0.6;
    transition: transform 0.3s;
}

.lang-switcher:hover .lang-current i,
.lang-switcher.active .lang-current i {
    transform: rotate(180deg);
}

.lang-flag {
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.lang-flag .flag-icon {
    width: 22px;
    height: 15px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.lang-code {
    font-weight: 600;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 140px;
    background: var(--color-white);
    border: 1px solid var(--color-gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--color-gray-700);
    text-decoration: none;
    transition: all 0.2s ease;
}

.lang-option:first-child {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.lang-option:hover {
    background: var(--color-gray-100);
    color: var(--color-blue);
}

/* Hide Area Riservata button on mobile, show lang switcher */
.btn-area-riservata {
    display: none;
}

@media (min-width: 768px) {
    .lang-current {
        padding: 8px 14px;
        font-size: 14px;
    }

    .lang-flag .flag-icon {
        width: 26px;
        height: 18px;
    }

    .btn-area-riservata {
        display: inline-flex;
    }
}

/* ========================================
   HOMEPAGE HERO (Mobile First)
   ======================================== */
.home-hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
    overflow: hidden;
    margin-top: 65px;
}

@media (min-width: 768px) {
    .home-hero {
        margin-top: 91px;
    }
}

.home-hero-bg {
    position: absolute;
    inset: 0;
}

.home-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(27, 58, 109, 0.92) 0%, rgba(15, 40, 71, 0.88) 100%);
}

.home-hero-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
}

.home-hero-content {
    max-width: 800px;
}

.home-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-xl);
    color: var(--color-white);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
}

.home-hero-badge i {
    color: var(--color-orange);
}

.home-hero-title {
    color: var(--color-white);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.15;
}

.home-hero-subtitle {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 28px;
    line-height: 1.6;
}

.home-hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.home-hero-buttons .btn {
    width: 100%;
    justify-content: center;
}

.btn-white {
    background: transparent;
    color: var(--color-white) !important;
    border-color: var(--color-white);
}

.btn-white:hover {
    background: var(--color-white);
    color: var(--color-blue-dark) !important;
}

.home-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.home-hero-stat {
    text-align: center;
}

.home-hero-stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-white);
    line-height: 1.2;
}

.home-hero-stat-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.3;
}

/* Tablet Hero */
@media (min-width: 600px) {
    .home-hero {
        padding: 120px 0 80px;
    }

    .home-hero-badge {
        gap: 10px;
        padding: 10px 20px;
        font-size: 14px;
        margin-bottom: 24px;
    }

    .home-hero-title {
        font-size: 2.5rem;
        margin-bottom: 20px;
    }

    .home-hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 32px;
    }

    .home-hero-buttons {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px;
        margin-bottom: 50px;
    }

    .home-hero-buttons .btn {
        width: auto;
    }

    .home-hero-stats {
        gap: 32px;
        padding-top: 32px;
    }

    .home-hero-stat-value {
        font-size: 2rem;
    }

    .home-hero-stat-label {
        font-size: 13px;
    }
}

/* Desktop Hero */
@media (min-width: 768px) {
    .home-hero {
        margin-top: 75px;
        padding: 140px 0 100px;
    }

    .home-hero-container {
        padding: 0 24px;
    }

    .home-hero-title {
        font-size: clamp(2.5rem, 5vw, 4rem);
        margin-bottom: 24px;
    }

    .home-hero-subtitle {
        font-size: 1.25rem;
        margin-bottom: 40px;
        max-width: 600px;
    }

    .home-hero-buttons {
        margin-bottom: 60px;
    }

    .home-hero-stats {
        display: flex;
        gap: 48px;
        padding-top: 40px;
    }

    .home-hero-stat {
        text-align: left;
    }

    .home-hero-stat-value {
        font-size: 2.5rem;
    }

    .home-hero-stat-label {
        font-size: 14px;
    }
}

/* ========================================
   HOMEPAGE ABOUT SECTION (Mobile First)
   ======================================== */
.home-about {
    background: var(--color-white);
}

.home-about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.home-about-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.home-about-image img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.home-about-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: var(--gradient-accent);
    color: var(--color-white);
    padding: 14px 20px;
    border-radius: var(--radius-md);
    text-align: center;
}

.home-about-badge-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.home-about-badge-label {
    font-size: 11px;
    opacity: 0.9;
}

.section-title.text-left {
    text-align: left;
}

.home-about-desc {
    color: var(--color-gray-600);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.home-about-checks {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.home-about-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--color-gray-700);
}

.home-about-check i {
    color: var(--color-orange);
    font-size: 16px;
    flex-shrink: 0;
}

/* Tablet About */
@media (min-width: 600px) {
    .home-about-image img {
        height: 350px;
    }

    .home-about-badge {
        bottom: 20px;
        right: 20px;
        padding: 16px 24px;
    }

    .home-about-badge-value {
        font-size: 2rem;
    }

    .home-about-badge-label {
        font-size: 12px;
    }

    .home-about-checks {
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }

    .home-about-check {
        font-size: 15px;
    }
}

/* Desktop About */
@media (min-width: 768px) {
    .home-about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 60px;
    }

    .home-about-image img {
        height: 450px;
    }

    .home-about-badge {
        bottom: 30px;
        right: 30px;
        padding: 20px 30px;
    }

    .home-about-badge-value {
        font-size: 2.5rem;
    }

    .home-about-badge-label {
        font-size: 13px;
    }

    .home-about-desc {
        font-size: 17px;
        line-height: 1.8;
        margin-bottom: 30px;
    }

    .home-about-checks {
        gap: 16px;
        margin-bottom: 30px;
    }

    .home-about-check {
        gap: 12px;
    }

    .home-about-check i {
        font-size: 18px;
    }
}

/* ========================================
   SECTION VARIANTS (Mobile First)
   ======================================== */
.section-numeri {
    background: linear-gradient(135deg, #1B3A6D 0%, #2E5AAC 50%, #1B4A8D 100%);
}

.section-badge-light {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
}

.section-title-light {
    color: var(--color-white);
}

.section-cta {
    text-align: center;
    margin-top: 40px;
}

@media (min-width: 768px) {
    .section-cta {
        margin-top: 50px;
    }
}

/* KPI Card Variants */
.kpi-card-dark {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.kpi-card-green {
    background: rgba(76, 175, 80, 0.15);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.kpi-icon-dark {
    background: rgba(255, 255, 255, 0.1);
}

.kpi-icon-dark i {
    color: var(--color-orange);
}

.kpi-icon-green {
    background: rgba(76, 175, 80, 0.15);
}

.kpi-icon-green i {
    color: #81C784;
}

.kpi-value-light {
    color: var(--color-white);
}

.kpi-label-light {
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   BEATRICE MOBILE FIX
   ======================================== */
#beatrice {
    bottom: 16px !important;
    right: 16px !important;
}

#beatrice-panel {
    width: calc(100vw - 32px) !important;
    max-width: 360px !important;
    bottom: 70px !important;
    right: 0 !important;
    max-height: calc(100vh - 100px) !important;
    max-height: calc(100dvh - 100px) !important;
}

#beatrice-toggle {
    padding: 10px 14px 10px 10px !important;
}

#beatrice-toggle span:last-child {
    display: none;
}

@media (min-width: 480px) {
    #beatrice-toggle span:last-child {
        display: inline;
    }
}

@media (min-width: 768px) {
    #beatrice {
        bottom: 30px !important;
        right: 30px !important;
    }

    #beatrice-panel {
        width: 360px !important;
        bottom: 80px !important;
    }

    #beatrice-toggle {
        padding: 12px 20px 12px 12px !important;
    }
}

/* ========================================
   SERVICE CARDS FIX FOR HOMEPAGE
   ======================================== */
.service-card-content .btn-outline {
    padding: 10px 20px;
    font-size: 13px;
}

@media (min-width: 768px) {
    .service-card-content .btn-outline {
        padding: 12px 24px;
        font-size: 14px;
    }
}

/* ========================================
   SECTION VARIANTS
   ======================================== */
.section-gray {
    background: #F5F7FA;
}

.admin-edit-link {
    text-align: center;
    margin-top: 20px;
}

.admin-edit-link a {
    color: var(--color-orange);
    font-size: 14px;
}

/* ========================================
   TREND CHART - MOBILE FIRST
   ======================================== */
.trend-chart-wrapper {
    background: var(--color-white);
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.trend-chart {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    text-align: center;
    overflow-x: auto;
}

.trend-bar-wrapper {
    min-width: 40px;
}

.trend-bar-container {
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
}

.trend-bar-value {
    font-size: 10px;
    font-weight: 600;
    color: var(--color-blue-dark);
    margin-bottom: 6px;
}

.trend-bar {
    width: 100%;
    max-width: 30px;
    border-radius: 6px 6px 0 0;
    transition: height 0.3s;
}

.trend-bar.completed {
    background: var(--color-blue-dark);
}

.trend-bar.current {
    background: var(--color-orange);
}

.trend-bar.future {
    background: var(--color-gray-200);
}

.trend-bar-label {
    font-size: 10px;
    color: var(--color-gray-600);
    margin-top: 8px;
    display: block;
}

.trend-legend {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--color-gray-200);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.trend-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trend-legend-color {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

.trend-legend-color.completed {
    background: var(--color-blue-dark);
}

.trend-legend-color.current {
    background: var(--color-orange);
}

.trend-legend-item span {
    font-size: 13px;
    color: var(--color-gray-600);
}

@media (min-width: 600px) {
    .trend-chart-wrapper {
        padding: 30px;
    }

    .trend-chart {
        grid-template-columns: repeat(12, 1fr);
        gap: 10px;
    }

    .trend-bar-container {
        height: 160px;
    }

    .trend-bar-value {
        font-size: 11px;
    }

    .trend-bar {
        max-width: 35px;
    }

    .trend-bar-label {
        font-size: 11px;
    }

    .trend-legend {
        flex-direction: row;
        justify-content: center;
        gap: 32px;
    }
}

@media (min-width: 768px) {
    .trend-chart-wrapper {
        padding: 40px;
        border-radius: var(--radius-xl);
    }

    .trend-chart {
        gap: 12px;
    }

    .trend-bar-container {
        height: 180px;
    }

    .trend-bar-value {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .trend-bar {
        max-width: 40px;
        border-radius: 8px 8px 0 0;
    }

    .trend-bar-label {
        font-size: 12px;
    }

    .trend-legend {
        margin-top: 24px;
        padding-top: 24px;
        gap: 40px;
    }

    .trend-legend-color {
        width: 16px;
        height: 16px;
    }

    .trend-legend-item span {
        font-size: 14px;
    }
}

/* ========================================
   PERFORMANCE CARDS - MOBILE FIRST
   ======================================== */
.perf-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.perf-card {
    background: var(--color-white);
    padding: 24px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.perf-card-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.perf-card-header h4 {
    color: var(--color-blue-dark);
    margin: 0;
    font-size: 1rem;
}

.perf-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #4CAF50;
}

.perf-bar-bg {
    height: 8px;
    background: var(--color-gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.perf-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #81C784 100%);
    border-radius: 4px;
}

.perf-desc {
    color: var(--color-gray-600);
    font-size: 13px;
    margin-top: 14px;
    margin-bottom: 0;
    line-height: 1.5;
}

@media (min-width: 600px) {
    .perf-card-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .perf-value {
        font-size: 1.5rem;
    }
}

@media (min-width: 768px) {
    .perf-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
    }

    .perf-card {
        padding: 40px;
        border-radius: var(--radius-xl);
    }

    .perf-card-header {
        margin-bottom: 20px;
    }

    .perf-card-header h4 {
        font-size: 1.125rem;
    }

    .perf-value {
        font-size: 2rem;
    }

    .perf-desc {
        font-size: 14px;
        margin-top: 16px;
    }
}

/* ========================================
   SUSTAINABILITY CARDS - MOBILE FIRST
   ======================================== */
.sost-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.sost-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 30px 20px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sost-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    background: rgba(76, 175, 80, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sost-icon i {
    font-size: 28px;
    color: #81C784;
}

.sost-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-white);
}

.sost-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
}

@media (min-width: 480px) {
    .sost-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sost-card {
        padding: 24px 16px;
    }

    .sost-icon {
        width: 50px;
        height: 50px;
    }

    .sost-icon i {
        font-size: 24px;
    }

    .sost-value {
        font-size: 1.5rem;
    }

    .sost-label {
        font-size: 12px;
    }
}

@media (min-width: 768px) {
    .sost-grid {
        gap: 30px;
    }

    .sost-card {
        padding: 40px;
        border-radius: var(--radius-lg);
    }

    .sost-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .sost-icon i {
        font-size: 36px;
    }

    .sost-value {
        font-size: 3rem;
    }

    .sost-label {
        font-size: 14px;
    }
}

/* ========================================
   GLOBAL MOBILE FIXES
   ======================================== */
/* Remove any horizontal overflow and reset margins */
.site-main,
main,
#main {
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

/* Reset parent theme margins if any */
.elementor-page .site-main,
.hello-elementor .site-main,
body.page .site-main {
    margin: 0 !important;
    padding: 0 !important;
}

/* ========================================
   FORCE FULL WIDTH - HEADER & FOOTER
   ======================================== */
.site-header,
#header {
    position: fixed !important;
    top: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 1000 !important;
    box-sizing: border-box !important;
}

.site-footer,
footer {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    left: 0 !important;
    right: 0 !important;
    box-sizing: border-box !important;
}

.header-inner,
.footer-grid,
.footer-bottom {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
}

/* Override any parent theme constraints */
body.hello-elementor .site-header,
body.hello-elementor .site-footer,
body.hello-elementor footer,
body .site-header,
body .site-footer {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
}

/* Ensure sections are full width and centered */
.section,
.page-hero,
.cta-banner,
.home-hero,
.section-light,
.section-gray,
.section-numeri {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* Ensure site main is full width */
.site-main,
#main,
main {
    width: 100%;
    max-width: 100%;
}

/* Container centering fix */
.container,
.section > div[style*="max-width"],
.section > div:first-child:not([class]) {
    width: 100%;
    max-width: 1200px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 16px;
    padding-right: 16px;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .container,
    .section > div[style*="max-width"],
    .section > div:first-child:not([class]) {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Fix container on mobile */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
}

@media (min-width: 768px) {
    .container {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* Make all images responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Fix text overflow */
h1, h2, h3, h4, h5, h6, p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Hide horizontal scrollbar but allow if needed */
body {
    overflow-x: hidden;
}

/* ========================================
   GLOBAL GRID OVERRIDES FOR MOBILE
   These override inline styles on pages
   ======================================== */
/* Any div with inline grid 2 columns - stack on mobile */
.section > div > div[style*="grid-template-columns:1fr 1fr"],
.section > div > div[style*="grid-template-columns: 1fr 1fr"],
.section div[style*="grid-template-columns:repeat(2"],
.section div[style*="grid-template-columns: repeat(2"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
}

/* Any div with inline grid 3+ columns - stack on mobile */
.section div[style*="grid-template-columns:repeat(3"],
.section div[style*="grid-template-columns: repeat(3"],
.section div[style*="grid-template-columns:repeat(4"],
.section div[style*="grid-template-columns: repeat(4"],
.section div[style*="grid-template-columns:repeat(12"],
.section div[style*="grid-template-columns: repeat(12"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
}

/* Fix flex rows to wrap on mobile */
.section div[style*="display:flex"][style*="gap:"],
.section div[style*="display: flex"][style*="gap:"] {
    flex-wrap: wrap !important;
}

/* Fix images with fixed height on mobile */
.section img[style*="height:"] {
    height: auto !important;
    max-height: 300px !important;
    object-fit: cover !important;
}

/* Fix padding on mobile */
.section > div[style*="padding:40px"],
.section > div[style*="padding: 40px"],
.section div[style*="padding:40px"],
.section div[style*="padding: 40px"] {
    padding: 20px !important;
}

/* Tablet - allow 2 columns */
@media (min-width: 600px) {
    .section div[style*="grid-template-columns:repeat(3"],
    .section div[style*="grid-template-columns: repeat(3"],
    .section div[style*="grid-template-columns:repeat(4"],
    .section div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    .section img[style*="height:"] {
        max-height: 350px !important;
    }

    .section div[style*="padding:40px"],
    .section div[style*="padding: 40px"] {
        padding: 30px !important;
    }
}

/* Desktop - restore intended layouts */
@media (min-width: 768px) {
    .section > div > div[style*="grid-template-columns:1fr 1fr"],
    .section > div > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr 1fr !important;
        gap: 60px !important;
    }

    .section div[style*="grid-template-columns:repeat(2"],
    .section div[style*="grid-template-columns: repeat(2"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 40px !important;
    }

    .section div[style*="grid-template-columns:repeat(3"],
    .section div[style*="grid-template-columns: repeat(3"] {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 30px !important;
    }

    .section div[style*="grid-template-columns:repeat(4"],
    .section div[style*="grid-template-columns: repeat(4"] {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 30px !important;
    }

    .section img[style*="height:"] {
        max-height: none !important;
    }

    .section div[style*="padding:40px"],
    .section div[style*="padding: 40px"] {
        padding: 40px !important;
    }
}

/* Large screens - allow more columns for trend chart */
@media (min-width: 992px) {
    .section div[style*="grid-template-columns:repeat(12"],
    .section div[style*="grid-template-columns: repeat(12"] {
        grid-template-columns: repeat(12, 1fr) !important;
        gap: 12px !important;
    }
}

/* ========================================
   CONTACT PAGE MOBILE FIX
   ======================================== */
/* Override inline grid for contact section - stack on mobile */
.section-light > div[style*="max-width:1200px"] > div[style*="grid-template-columns:1fr 1.5fr"],
.section-light > div[style*="max-width: 1200px"] > div[style*="grid-template-columns: 1fr 1.5fr"],
.section > div > div[style*="grid-template-columns:1fr 1.5fr"],
.section > div > div[style*="grid-template-columns: 1fr 1.5fr"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 30px !important;
}

/* Fix form padding on mobile */
div[style*="padding:50px"],
div[style*="padding: 50px"] {
    padding: 20px !important;
}

/* Fix form inner grid - 2 columns to 1 on mobile */
form div[style*="grid-template-columns:1fr 1fr"],
form div[style*="grid-template-columns: 1fr 1fr"] {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
}

/* Prevent horizontal overflow from form inputs */
form input,
form select,
form textarea {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Tablet - restore 2 column forms */
@media (min-width: 600px) {
    div[style*="padding:50px"],
    div[style*="padding: 50px"] {
        padding: 30px !important;
    }

    form div[style*="grid-template-columns:1fr 1fr"],
    form div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }
}

/* Desktop - restore contact layout */
@media (min-width: 768px) {
    .section-light > div[style*="max-width:1200px"] > div[style*="grid-template-columns:1fr 1.5fr"],
    .section-light > div[style*="max-width: 1200px"] > div[style*="grid-template-columns: 1fr 1.5fr"],
    .section > div > div[style*="grid-template-columns:1fr 1.5fr"],
    .section > div > div[style*="grid-template-columns: 1fr 1.5fr"] {
        grid-template-columns: 1fr 1.5fr !important;
        gap: 60px !important;
    }

    div[style*="padding:50px"],
    div[style*="padding: 50px"] {
        padding: 50px !important;
    }
}

/* ========================================
   FONT SIZE RESPONSIVE
   ======================================== */
/* Make large fonts smaller on mobile */
[style*="font-size:2rem"],
[style*="font-size: 2rem"],
[style*="font-size:2.5rem"],
[style*="font-size: 2.5rem"],
[style*="font-size:3rem"],
[style*="font-size: 3rem"] {
    font-size: 1.5rem !important;
}

@media (min-width: 600px) {
    [style*="font-size:2rem"],
    [style*="font-size: 2rem"] {
        font-size: 1.75rem !important;
    }

    [style*="font-size:2.5rem"],
    [style*="font-size: 2.5rem"],
    [style*="font-size:3rem"],
    [style*="font-size: 3rem"] {
        font-size: 2rem !important;
    }
}

@media (min-width: 768px) {
    [style*="font-size:2rem"],
    [style*="font-size: 2rem"] {
        font-size: 2rem !important;
    }

    [style*="font-size:2.5rem"],
    [style*="font-size: 2.5rem"] {
        font-size: 2.5rem !important;
    }

    [style*="font-size:3rem"],
    [style*="font-size: 3rem"] {
        font-size: 3rem !important;
    }
}
