/* ============================================
   IDEATRAIL — Portale Pubblico
   CSS Globale — Tutte le pagine
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ——— VARIABLES ——— */
:root {
    --green-dark: #1a5c38;
    --green: #2d8659;
    --green-light: #3aaf6e;
    --green-bg: #f0f8f4;
    --blue: #1565C0;
    --blue-light: #42A5F5;
    --orange: #E65100;
    --orange-light: #FF8F00;
    --purple: #7B1FA2;
    --text-dark: #1f3a3a;
    --text: #2c3e50;
    --text-muted: #6c757d;
    --bg: #f8f9fa;
    --white: #ffffff;
    --border: #e0e4e8;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

/* ——— RESET & BASE ——— */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a { color: var(--green); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--green-dark); }
img { max-width: 100%; height: auto; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar-ideatrail {
    background: var(--white);
    border-bottom: 3px solid var(--green);
    box-shadow: var(--shadow-sm);
    padding: 8px 0;
    z-index: 1050;
}

.navbar-ideatrail .navbar-brand {
    text-decoration: none;
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--green-dark), var(--green-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(45,134,89,0.3);
}

.brand-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.navbar-ideatrail .nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: #4b5563 !important;
    padding: 8px 14px !important;
    border-radius: 6px;
    position: relative;
    transition: var(--transition);
}

.navbar-ideatrail .nav-link:hover {
    color: var(--green) !important;
    background: var(--green-bg);
}

.navbar-ideatrail .nav-link.active {
    color: var(--green) !important;
    font-weight: 600;
}

.navbar-ideatrail .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 3px;
    background: var(--green);
    border-radius: 2px;
}

.navbar-ideatrail .navbar-toggler {
    border: none;
    padding: 6px 10px;
}

.navbar-ideatrail .navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(45,134,89,0.3);
}

.navbar-ideatrail .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%232d8659' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991px) {
    .navbar-ideatrail .nav-link.active::after { display: none; }
    .navbar-ideatrail .navbar-nav { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 12px; }
    .navbar-ideatrail .nav-link.active { background: var(--green-bg); border-left: 3px solid var(--green); }
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: #1a1d23;
    color: white;
    padding: 50px 0 20px;
    margin-top: 0;
}

.brand-icon-sm {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--green-dark), var(--green-light));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.footer-heading {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.5);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--green);
}

.footer-links li { margin-bottom: 10px; }
.footer-links a {
    color: rgba(255,255,255,.7);
    font-size: 0.9rem;
    transition: var(--transition);
}
.footer-links a:hover { color: #81c784; padding-left: 4px; }

.footer-social {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,.6);
    font-size: 1rem;
    transition: var(--transition);
}
.footer-social:hover {
    background: var(--green);
    color: white;
    transform: translateY(-2px);
}

/* ============================================
   HOME PAGE
   ============================================ */

/* Hero */
.hero-section { background: var(--bg); }

.badge-free {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(45,134,89,0.12);
    color: var(--green);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Percorsi Grid */
.percorsi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
@media (max-width: 991px) { .percorsi-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .percorsi-grid { grid-template-columns: 1fr; } }

.percorsi-grid .trail-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.percorsi-grid .trail-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.trail-image-container {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.trail-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.trail-card:hover .trail-image-container img { transform: scale(1.08); }

.difficulty-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}
.difficulty-T { background: #27AE60; }
.difficulty-E { background: #F39C12; }
.difficulty-EE { background: #E67E22; }
.difficulty-EEA { background: #E74C3C; }

/* Service sections */
.service-section { padding: 80px 0; }

.service-icon-box {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: white;
    margin-bottom: 20px;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 36px 28px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: var(--transition);
    height: 100%;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.feature-card .feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: white;
}
.feature-card h5 { font-weight: 700; color: var(--text-dark); margin-bottom: 10px; }
.feature-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

/* Step numbers (how it works) */
.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--green);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    font-weight: 800;
    margin: 0 auto 16px;
}

/* CTA Banner */
.cta-banner {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, var(--green-light) 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}
.cta-banner h2 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; }
.cta-banner p { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto 30px; }

/* ============================================
   TRAIL CARD (list page + homepage)
   ============================================ */
.trail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.trail-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}
.trail-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

/* Trail card info section */
.trail-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.trail-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
    line-height: 1.3;
}
.trail-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.trail-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.trail-stats .stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.trail-stats .stat i { color: var(--green); font-size: 0.9rem; }
.trail-rating {
    font-size: 0.85rem;
}
.trail-rating i { font-size: 0.8rem; }
.trail-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.trail-card:hover .trail-image { transform: scale(1.08); }

/* ============================================
   DETAIL PAGE
   ============================================ */

/* Detail Hero */
.detail-hero {
    position: relative;
    height: 500px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.detail-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.6));
    z-index: 1;
}
.detail-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}
.detail-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    margin: 0;
}

/* Detail Breadcrumb */
.detail-hero + .breadcrumb {
    background: #f8f9fa;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

/* Info Grid */
.detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    margin-top: -40px;
    margin-bottom: 30px;
    position: relative;
    z-index: 5;
    overflow: hidden;
}
/* Support both class names: info-stat (legacy) and info-item (current) */
.info-stat,
.info-item {
    text-align: center;
    padding: 22px 12px;
    border-right: 1px solid #f0f0f0;
    border-left: 3px solid transparent;
    transition: var(--transition);
}
.info-stat:last-child,
.info-item:last-child { border-right: none; }
.info-stat:hover,
.info-item:hover {
    border-left-color: var(--green);
    background: var(--green-bg);
}
.info-stat .info-value,
.info-item .info-item-value,
.info-item-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--green);
    display: block;
    margin-bottom: 4px;
}
.info-stat .info-label,
.info-item .info-item-label,
.info-item-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Detail Sections */
.detail-section {
    background: white;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
}
.detail-section h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--green);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e8f5e9;
}
.detail-section h2 i { font-size: 24px; }

/* GPS Navigation Buttons */
.gps-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    background: var(--green);
}
.gps-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    color: white;
}
#btn-locate { background: #2d8659; }
#btn-locate:hover { background: #1a5c38; }
#btn-navigate-desktop,
#btn-navigate-mobile { background: #1565C0; }
#btn-navigate-desktop:hover,
#btn-navigate-mobile:hover { background: #0d47a1; }

/* Navigation Info Panel */
#nav-info {
    background: #f0f8f4;
    border: 2px solid #2d8659;
    border-radius: 12px;
}

/* Elevation Profile */
.elevation-profile { position: relative; }
.elevation-container { position: relative; }
#elevation-canvas {
    width: 100%;
    border-radius: 8px;
}

/* Gallery */
.gallery,
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.gallery-item {
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 160px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}
.gallery-item:hover { transform: scale(1.03); }
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
    font-size: 2rem;
}
.gallery-item:hover .gallery-item-overlay { opacity: 1; }

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.95);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
.lightbox-image,
.lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10000;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10000;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* POI */
.poi-list { list-style: none; padding: 0; margin: 0; }
.poi-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}
.poi-item:hover { padding-left: 8px; background: var(--green-bg); margin: 0 -16px; padding: 16px; border-radius: 8px; }
.poi-item:last-child { border-bottom: none; }
.poi-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--green-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green);
    font-size: 20px;
    flex-shrink: 0;
    border: 2px solid rgba(45,134,89,0.15);
}
.poi-content h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 4px;
}
.poi-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}
.poi-distance {
    font-size: 0.8rem;
    color: var(--green);
    margin: 0 0 4px;
    font-weight: 500;
}

/* Practical Info */
.practical-info p {
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
    color: #495057;
}
.practical-info strong {
    color: var(--text-dark);
}

/* Reviews Section */
.reviews-section { padding: 0; }
.reviews-summary {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.review-score { text-align: center; }
.review-score-big {
    font-size: 48px;
    font-weight: 900;
    color: var(--green);
    line-height: 1;
    margin-bottom: 6px;
}
.stars { color: #FFB400; font-size: 1.2rem; margin-bottom: 4px; }
.stars i { margin: 0 1px; }
.review-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Review Form */
.review-form {
    background: var(--green-bg);
    border-radius: var(--radius);
    padding: 28px;
    margin-top: 20px;
}
.review-form h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}
.star-rating {
    display: flex;
    gap: 6px;
    margin-bottom: 16px;
}
.star-rating span {
    font-size: 2rem;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
    line-height: 1;
}
.star-rating span:hover,
.star-rating span.active {
    color: #FFB400;
    transform: scale(1.15);
}
.review-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    min-height: 120px;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    margin-bottom: 16px;
}
.review-form textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(45,134,89,0.1);
}
.review-submit-btn {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
}
.review-submit-btn:hover {
    background: linear-gradient(135deg, var(--green-dark), var(--green));
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(45,134,89,0.3);
}

/* QR Code Section */
.qr-canvas {
    display: inline-block;
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

/* Map */
#map, #map-explore, #map-detail { height: 500px; width: 100%; border-radius: var(--radius-sm); }
.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

/* User Position Marker */
.user-position-marker { background: transparent !important; border: none !important; }
.poi-marker, .paline-marker { background: transparent !important; border: none !important; }

/* Spin animation */
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin-icon { animation: spin 1s linear infinite; display: inline-block; }

/* ============================================
   COMUNI PAGE
   ============================================ */
.comune-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}
.comune-card {
    background: white;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.comune-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.comune-image { position: relative; height: 180px; overflow: hidden; }
.comune-image img { width: 100%; height: 100%; object-fit: cover; }
.comune-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}
.comune-card:hover .comune-overlay { opacity: 1; }

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-hero {
    background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 50%, var(--green-light) 100%);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
}
.contact-hero h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 12px; }
.contact-hero p { font-size: 1.15rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-top: -50px;
    position: relative;
    z-index: 2;
}
.contact-card {
    background: white;
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    transition: var(--transition);
}
.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
}
.contact-card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 28px;
    color: white;
}
.contact-card h5 { font-weight: 700; margin-bottom: 8px; color: var(--text-dark); }
.contact-card p { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 8px; }
.contact-card a { color: var(--green); font-weight: 600; font-size: 1rem; }
.contact-card a:hover { color: var(--green-dark); }

.contact-form-section { padding: 80px 0; }
.contact-form-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    overflow: hidden;
}
.form-sidebar {
    background: linear-gradient(180deg, var(--green-dark) 0%, var(--green) 100%);
    color: white;
    padding: 48px 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.form-sidebar h3 { font-size: 1.6rem; font-weight: 700; margin-bottom: 16px; }
.form-sidebar p { opacity: 0.85; line-height: 1.7; margin-bottom: 30px; }
.form-sidebar-item {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}
.form-sidebar-item i {
    font-size: 1.3rem;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.form-sidebar-item span { font-size: 0.95rem; }

.form-body { padding: 48px 40px; }
.form-body h3 { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); margin-bottom: 8px; }
.form-body .form-subtitle { color: var(--text-muted); margin-bottom: 30px; }

.form-floating-custom { margin-bottom: 20px; }
.form-floating-custom label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #495057;
    margin-bottom: 6px;
    display: block;
}
.form-floating-custom input,
.form-floating-custom select,
.form-floating-custom textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}
.form-floating-custom input:focus,
.form-floating-custom select:focus,
.form-floating-custom textarea:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(45,134,89,0.1);
}
.form-floating-custom textarea { min-height: 140px; resize: vertical; }

.btn-submit {
    background: linear-gradient(135deg, var(--green), var(--green-light));
    color: white;
    border: none;
    padding: 14px 36px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.btn-submit:hover {
    background: linear-gradient(135deg, var(--green-dark), var(--green));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45,134,89,0.3);
}
.btn-submit:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

.form-alert {
    padding: 14px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    font-weight: 500;
}
.form-alert.success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; display: block; }
.form-alert.error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; display: block; }

.company-section { padding: 60px 0; background: var(--bg); }
.company-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06);
}
.company-card h4 { font-weight: 700; color: var(--text-dark); margin-bottom: 20px; }

.response-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(45,134,89,0.1);
    color: var(--green);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Honeypot (anti-spam) */
.ht-field { position: absolute !important; left: -9999px !important; opacity: 0 !important; height: 0 !important; width: 0 !important; }

/* ============================================
   BREADCRUMB
   ============================================ */
.breadcrumb-item a { color: var(--green); }
.breadcrumb-item a:hover { color: var(--green-dark); text-decoration: underline; }
.breadcrumb-item.active { color: #495057; }

/* ============================================
   FILTERS (percorsi page)
   ============================================ */
.filters-panel {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
    overflow: hidden;
    position: sticky;
    top: 80px;
}
.filters-panel .card-header {
    padding: 16px 20px;
    border-bottom: none;
}
.filters-panel .card-header h5 {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.filters-panel .card-body {
    padding: 20px;
}
.filters-panel .form-label {
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-dark);
}
.filters-panel .form-control,
.filters-panel .form-select {
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    padding: 8px 12px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.filters-panel .form-control:focus,
.filters-panel .form-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(45,134,89,0.1);
}
.filters-grid {
    display: flex;
    flex-direction: column;
}

/* Search container on homepage */
.search-container {
    background: white;
    padding: 24px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.search-container .form-control,
.search-container .form-select {
    border: 2px solid var(--border);
    border-radius: 10px;
}
.search-container .form-control:focus,
.search-container .form-select:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(45,134,89,0.1);
}

/* ============================================
   INSTITUTIONAL PAGES
   ============================================ */
.page-content { padding: 60px 0; }
.page-content h1 { font-size: 36px; font-weight: 800; color: var(--green); margin-bottom: 24px; }
.page-content h2 { font-size: 24px; font-weight: 700; color: var(--green); margin-top: 40px; margin-bottom: 16px; }
.page-content p { font-size: 16px; margin-bottom: 16px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .trail-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
    .percorsi-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery, .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
    .gallery-item { height: 130px; }
    .filters-panel { position: static; }
}

@media (max-width: 768px) {
    .contact-hero { padding: 60px 0 50px; }
    .contact-hero h1 { font-size: 2rem; }
    .form-body { padding: 30px 24px; }
    .form-sidebar { padding: 30px 24px; }
    .detail-hero { height: 300px; }
    .detail-hero h1 { font-size: 2rem; }
    .detail-info-grid { margin-top: -25px; grid-template-columns: repeat(3, 1fr); }
    .info-stat, .info-item { padding: 16px 8px; }
    .info-stat .info-value, .info-item .info-item-value, .info-item-value { font-size: 1.1rem; }
    .detail-section { padding: 20px; }
    #map, #map-explore, #map-detail { height: 350px; }
    .gps-nav-btn { padding: 12px 18px; font-size: 0.9rem; }
    .reviews-summary { flex-direction: column; text-align: center; }
    .review-score-big { font-size: 36px; }
    .review-form { padding: 20px; }
    .lightbox-nav { width: 40px; height: 40px; font-size: 22px; }
}

@media (max-width: 576px) {
    .detail-info-grid { grid-template-columns: repeat(2, 1fr); }
    .gallery, .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .gallery-item { height: 110px; }
    .poi-item { gap: 12px; }
    .poi-icon { width: 40px; height: 40px; font-size: 16px; }
    .trail-grid { grid-template-columns: 1fr; }
    .percorsi-grid { grid-template-columns: 1fr; }
    .trail-image-container { height: 180px; }
}