/**
 * Excel Immobiliare — Custom Styles
 */

/* WordPress Core Alignment */
.alignwide { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; max-width: 100%; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignleft { float: left; margin-right: 1.5rem; }
.alignright { float: right; margin-left: 1.5rem; }

/* WordPress Navigation */
.nav-links { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.nav-links a, .nav-links span { padding: 0.5rem 1rem; border: 1px solid #e5e7eb; border-radius: 0.5rem; }
.nav-links .current { background: #2563eb; color: white; border-color: #2563eb; }
.nav-links a:hover { background: #f9fafb; }

/* Custom Logo */
.custom-logo-link { display: flex; align-items: center; }
.custom-logo { max-height: 40px; width: auto; }

/* Navigation Menu Items */
.menu-item a { color: #374151; font-weight: 500; transition: color 0.15s; }
.menu-item a:hover { color: #2563eb; }
.current-menu-item a { color: #2563eb; }

/* Widget Styles */
.widget { margin-bottom: 2rem; }
.widget-title { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; color: white; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { margin-bottom: 0.5rem; }
.widget ul li a { color: #9ca3af; transition: color 0.15s; }
.widget ul li a:hover { color: white; }

/* FAQ Toggle Animation */
.ti-faq-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }

/* Download Button Animation */
.download-btn { position: relative; overflow: hidden; }
.download-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.download-btn:active::after { width: 200px; height: 200px; }

/* Mobile Menu */
#ti-mobile-menu.active { display: block; }

/* Cookie Banner Animation */
#ti-cookie.show { display: block; animation: slideUp 0.3s ease; }
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}
@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Scroll to Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: #2563eb;
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
    z-index: 40;
}
#scroll-to-top:hover { background: #1d4ed8; transform: translateY(-2px); }
#scroll-to-top.show { display: flex; }

/* Print Styles */
@media print {
    header, footer, .download-btn, #ti-cookie, #scroll-to-top { display: none !important; }
    body { font-size: 12pt; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 10pt; }
}

/* Focus Visible for Accessibility */
:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =====================================================
   EXCEL MOCKUP STYLES
   ===================================================== */

.excel-mockup-container {
    position: relative;
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform 0.3s ease;
}

.excel-mockup-container:hover {
    transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
}

.excel-window {
    background: #f3f3f3;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 11px;
}

/* Title Bar */
.excel-titlebar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, #217346 0%, #1a5c38 100%);
    padding: 6px 12px;
    color: white;
}

.excel-titlebar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.excel-icon {
    width: 18px;
    height: 18px;
}

.excel-filename {
    font-size: 12px;
    font-weight: 500;
    opacity: 0.95;
}

.excel-titlebar-buttons {
    display: flex;
    gap: 8px;
}

.excel-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.excel-btn.minimize { background: #f5c242; }
.excel-btn.maximize { background: #3dc04f; }
.excel-btn.close { background: #ed594a; }

/* Ribbon */
.excel-ribbon {
    background: #217346;
    padding: 4px 12px;
    border-bottom: 1px solid #1a5c38;
}

.excel-ribbon-tabs {
    display: flex;
    gap: 16px;
    color: white;
    font-size: 11px;
}

.excel-ribbon-tabs span {
    padding: 4px 0;
    opacity: 0.7;
    cursor: pointer;
}

.excel-ribbon-tabs span.active {
    opacity: 1;
    border-bottom: 2px solid white;
}

/* Formula Bar */
.excel-formula-bar {
    display: flex;
    align-items: center;
    background: white;
    border-bottom: 1px solid #d6d6d6;
    padding: 4px 8px;
    gap: 8px;
}

.excel-cell-ref {
    min-width: 50px;
    padding: 2px 6px;
    background: #f5f5f5;
    border: 1px solid #d6d6d6;
    font-size: 10px;
    text-align: center;
}

.excel-fx {
    color: #666;
    font-style: italic;
    font-size: 10px;
}

.excel-formula-input {
    flex: 1;
    padding: 2px 6px;
    background: white;
    border: 1px solid #d6d6d6;
    font-size: 10px;
    color: #333;
    min-height: 18px;
}

/* Spreadsheet Grid */
.excel-sheet-area {
    background: white;
    overflow: hidden;
}

.excel-grid {
    display: grid;
    grid-template-columns: 30px repeat(5, minmax(0, 1fr));
    border: 1px solid #d6d6d6;
}

.excel-corner {
    background: #f5f5f5;
    border-right: 1px solid #c0c0c0;
    border-bottom: 1px solid #c0c0c0;
}

.excel-col-header {
    background: #f5f5f5;
    border-right: 1px solid #c0c0c0;
    border-bottom: 1px solid #c0c0c0;
    padding: 4px;
    text-align: center;
    font-weight: 500;
    color: #333;
}

.excel-row-header {
    background: #f5f5f5;
    border-right: 1px solid #c0c0c0;
    border-bottom: 1px solid #c0c0c0;
    padding: 4px;
    text-align: center;
    font-weight: 500;
    color: #333;
}

.excel-cell {
    border-right: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 4px 6px;
    min-height: 22px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #333;
}

/* Cell Types */
.excel-cell.header-cell {
    background: #217346;
    color: white;
    font-weight: 600;
}

.excel-cell.number-cell {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.excel-cell.currency-cell {
    text-align: right;
    color: #1a5c38;
    font-weight: 500;
}

.excel-cell.total-label {
    font-weight: 600;
    text-align: right;
}

.excel-cell.total-cell {
    font-weight: 700;
    text-align: right;
    background: #f0f7f4;
}

.excel-cell.total-cell.highlight {
    background: #d4edda;
    color: #155724;
}

.excel-cell.positive {
    color: #28a745;
}

.excel-cell.warning {
    color: #ffc107;
}

.excel-cell.critical {
    color: #dc3545;
    font-weight: 600;
}

/* Sheet Tabs */
.excel-sheet-tabs {
    display: flex;
    align-items: flex-end;
    background: #e0e0e0;
    padding: 4px 8px 0;
    gap: 2px;
}

.excel-sheet-tab {
    background: #f5f5f5;
    padding: 4px 12px;
    border-radius: 4px 4px 0 0;
    font-size: 10px;
    color: #666;
    cursor: pointer;
    border: 1px solid #c0c0c0;
    border-bottom: none;
}

.excel-sheet-tab.active {
    background: white;
    color: #333;
    font-weight: 500;
}

.excel-sheet-tab-add {
    padding: 4px 8px;
    color: #888;
    cursor: pointer;
    font-size: 12px;
}

/* Status Bar */
.excel-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #217346;
    padding: 3px 12px;
    color: white;
    font-size: 10px;
}

.excel-status-left {
    opacity: 0.9;
}

.excel-zoom {
    opacity: 0.8;
}

/* Decorative Elements */
.excel-mockup-shadow {
    position: absolute;
    bottom: -15px;
    left: 10%;
    right: 10%;
    height: 20px;
    background: radial-gradient(ellipse at center, rgba(0,0,0,0.2) 0%, transparent 70%);
    filter: blur(8px);
    z-index: -1;
}

.excel-mockup-reflection {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(180deg, rgba(255,255,255,0.1) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 8px 8px 0 0;
}

/* Preview Notice */
.excel-preview-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.excel-preview-notice .notice-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 2px;
}

.excel-preview-notice p {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.excel-preview-notice strong {
    color: white;
}

/* ═══════════════════════════════════════════════════════════════════
   EXCEL IMMOBILIARE — palette
   Forest green #1B4332 (primary) + warm ochre/gold #C9962E (secondary)
   + cream/ivory #FAF6EE. Overrides ALL Tailwind blue utilities (safety).
   ═══════════════════════════════════════════════════════════════════ */
:root {
  --ti-primary: #1B4332;       /* deep forest green */
  --ti-primary-700: #143728;
  --ti-primary-600: #235641;
  --ti-secondary: #C9962E;     /* warm ochre / gold */
  --ti-secondary-600: #AE7F22;
  --ti-cream: #FAF6EE;         /* ivory */
  --ti-cream-2: #F3EDE0;
  --ti-ink: #1F2B26;
  --avg-primary: #1B4332;      /* keep customizer vars in sync */
  --avg-secondary: #C9962E;
}

/* --- NO BLUE: hard overrides of every Tailwind blue utility used --- */
.from-blue-900 { --tw-gradient-from: #1B4332 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(27,67,50,0)) !important; }
.via-blue-800  { --tw-gradient-stops: var(--tw-gradient-from), #1F4C39, var(--tw-gradient-to, rgba(31,76,57,0)) !important; }
.to-blue-700   { --tw-gradient-to: #235641 !important; }
.from-blue-600 { --tw-gradient-from: #1B4332 !important; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(27,67,50,0)) !important; }
.bg-blue-50   { background-color: #FAF6EE !important; }
.bg-blue-100  { background-color: #EAE0CC !important; }
.bg-blue-600  { background-color: #1B4332 !important; }
.bg-blue-700  { background-color: #143728 !important; }
.bg-blue-800  { background-color: #163B2C !important; }
.bg-blue-900  { background-color: #143728 !important; }
.text-blue-100 { color: #E7F0EA !important; }
.text-blue-200 { color: #CFE0D5 !important; }
.text-blue-600 { color: #1B4332 !important; }
.text-blue-700 { color: #143728 !important; }
.text-blue-800, .text-blue-900 { color: #143728 !important; }
.border-blue-200 { border-color: #E0D4BC !important; }
.border-blue-500, .border-blue-600 { border-color: #1B4332 !important; }
.hover\:bg-blue-50:hover  { background-color: #F3EDE0 !important; }
.hover\:bg-blue-600:hover { background-color: #235641 !important; }
.hover\:bg-blue-700:hover { background-color: #143728 !important; }
.hover\:text-blue-600:hover { color: #C9962E !important; }
.hover\:text-blue-700:hover { color: #AE7F22 !important; }
.focus\:ring-blue-500:focus { --tw-ring-color: #C9962E !important; }
.focus\:border-blue-500:focus { border-color: #1B4332 !important; }
.bg-white\/10 { background-color: rgba(255,255,255,0.12) !important; }
.bg-gradient-to-br.from-blue-900,
.bg-gradient-to-r.from-blue-600 { background: linear-gradient(135deg, #143728 0%, #1B4332 55%, #235641 100%) !important; }

/* ═══════════════════════════════════════════════════════════════════
   HEADER / NAV (ti-)
   ═══════════════════════════════════════════════════════════════════ */
.ti-header { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 1px 0 rgba(27,67,50,.08), 0 4px 14px -8px rgba(27,67,50,.18); }
.ti-header__bar { border-bottom: 1px solid #efe9dc; }
.ti-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }

.ti-brand-link { display: inline-flex; align-items: center; text-decoration: none; }
.ti-brand { display: inline-flex; align-items: center; gap: .6rem; }
.ti-brand__mark { display: block; flex-shrink: 0; }
.ti-brand__name { font-weight: 800; font-size: 1.3rem; letter-spacing: -.01em; color: var(--ti-primary); line-height: 1; }
.ti-brand__name--dark { color: #fff; }
.ti-brand__accent { color: var(--ti-secondary); }

.ti-nav { display: none; align-items: center; gap: 1.5rem; }
@media (min-width: 768px) { .ti-nav { display: flex; } }
.ti-nav__list { display: flex; align-items: center; gap: 1.5rem; margin: 0; padding: 0; list-style: none; }
.ti-nav__item { white-space: nowrap; }
.ti-nav__link { color: #41504a; font-weight: 600; font-size: .95rem; text-decoration: none; transition: color .15s; }
.ti-nav__link:hover { color: var(--ti-secondary); }
.ti-nav__cta { display: inline-flex; align-items: center; background: var(--ti-primary); color: #fff; font-weight: 600; padding: .55rem 1.1rem; border-radius: .6rem; text-decoration: none; transition: background .15s; white-space: nowrap; }
.ti-nav__cta:hover { background: var(--ti-primary-600); }

.ti-nav__burger { display: inline-flex; padding: .5rem; border-radius: .5rem; color: #41504a; background: transparent; border: 0; cursor: pointer; }
.ti-nav__burger:hover { background: #f3efe5; }
@media (min-width: 768px) { .ti-nav__burger { display: none; } }

/* search strip */
.ti-find-strip { background: var(--ti-cream); border-bottom: 1px solid #efe9dc; padding: .7rem 0; }
@media (max-width: 767px) { .ti-find-strip { display: none; } }
.ti-find { position: relative; display: flex; align-items: center; }
.ti-find__icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 1.1rem; height: 1.1rem; color: #9a8f78; pointer-events: none; }
.ti-find__input { width: 100%; min-width: 0; padding: .7rem 6.5rem .7rem 2.6rem; font-size: .95rem; color: #1f2b26; background: #fff; border: 1px solid #e3dbc9; border-radius: .7rem; outline: none; transition: box-shadow .15s, border-color .15s; -webkit-appearance: none; }
.ti-find__input:focus { border-color: var(--ti-secondary); box-shadow: 0 0 0 3px rgba(201,150,46,.22); }
.ti-find__submit, .ti-find__button { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); background: var(--ti-primary); color: #fff; font-weight: 600; border: 0; border-radius: .5rem; padding: .5rem 1.1rem; cursor: pointer; transition: background .15s; }
.ti-find__submit:hover, .ti-find__button:hover { background: var(--ti-secondary); }

/* mobile menu panel */
.ti-mobile { background: #fff; border-bottom: 1px solid #efe9dc; }
.ti-mobile__inner { padding: .9rem 1rem 1.1rem; }
.ti-find--mobile { margin-bottom: .8rem; }
.ti-mobile__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.ti-mobile__link { display: block; padding: .65rem .75rem; color: #41504a; font-weight: 600; border-radius: .55rem; text-decoration: none; }
.ti-mobile__link:hover { background: #f3efe5; color: var(--ti-primary); }
.ti-mobile__cta { display: block; margin-top: .7rem; text-align: center; background: var(--ti-primary); color: #fff; font-weight: 600; padding: .7rem 1rem; border-radius: .6rem; text-decoration: none; }

/* breadcrumbs */
.ti-crumbs { font-size: .85rem; color: #6b7c74; margin-bottom: 1rem; }
.ti-crumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.ti-crumbs__link { color: #6b7c74; text-decoration: none; }
.ti-crumbs__link:hover { color: var(--ti-secondary); }
.ti-crumbs__sep { color: #b9c2bc; }
.ti-crumbs__current { color: #1f2b26; font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   HOME HERO (ti-hero)
   ═══════════════════════════════════════════════════════════════════ */
.ti-hero__wrap { padding-top: 4.5rem; padding-bottom: 4.5rem; }
@media (min-width: 1024px) { .ti-hero__wrap { padding-top: 6rem; padding-bottom: 6rem; } }
.ti-hero__eyebrow { color: #d8e6dd; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 1rem; }
.ti-hero__title { font-size: clamp(2.1rem, 4.4vw, 3.5rem); font-weight: 800; line-height: 1.07; letter-spacing: -.02em; margin: 0 0 1.1rem; max-width: 22ch; }
.ti-hero__lead { font-size: 1.18rem; line-height: 1.6; color: #e3eee8; max-width: 46ch; margin: 0 0 1.8rem; }
.ti-find--hero { max-width: 38rem; }
.ti-find--hero .ti-find__input { padding: 1rem 7rem 1rem 3rem; font-size: 1.02rem; border: 0; border-radius: .85rem; box-shadow: 0 22px 45px -16px rgba(0,0,0,.45); }
.ti-find--hero .ti-find__icon { left: 1.1rem; width: 1.25rem; height: 1.25rem; }
.ti-hero__trust { margin: 1rem 0 0; color: #cfe0d5; font-size: .9rem; }
.ti-hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; max-width: 34rem; margin: 2.25rem 0 0; }
.ti-hero__stat { text-align: left; }
.ti-hero__stat-num { font-size: 1.9rem; font-weight: 800; color: #fff; line-height: 1; }
.ti-hero__stat-label { color: #cfe0d5; font-size: .82rem; margin-top: .3rem; }
.ti-hero__cta-row { margin-top: 2rem; }
.ti-hero__cta { display: inline-flex; align-items: center; background: var(--ti-secondary); color: #21160a; font-weight: 700; font-size: 1.02rem; padding: .9rem 1.6rem; border-radius: .75rem; text-decoration: none; box-shadow: 0 10px 24px -10px rgba(201,150,46,.6); transition: background .15s, transform .15s; }
.ti-hero__cta:hover { background: #d9a942; transform: translateY(-1px); }

/* ═══════════════════════════════════════════════════════════════════
   CATEGORIES (ti-cat) — horizontal cards
   ═══════════════════════════════════════════════════════════════════ */
.ti-cat__head { max-width: 42rem; margin: 0 auto 2.5rem; text-align: center; }
.ti-cat__title { font-size: 1.9rem; font-weight: 800; color: var(--ti-ink); margin: 0 0 .6rem; }
.ti-cat__intro { font-size: 1.05rem; color: #5b6b63; margin: 0; }
.ti-cat__grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1rem; }
@media (min-width: 640px) { .ti-cat__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ti-cat__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ti-cat__card { display: flex; align-items: center; gap: .9rem; min-width: 0; background: #fff; border: 1px solid #ece5d6; border-radius: .9rem; padding: 1.1rem 1.2rem; text-decoration: none; transition: box-shadow .2s, border-color .2s, transform .2s; }
.ti-cat__card:hover { box-shadow: 0 14px 30px -16px rgba(27,67,50,.3); border-color: #e0d4bc; transform: translateY(-2px); }
.ti-cat__icon { flex-shrink: 0; width: 3rem; height: 3rem; border-radius: .7rem; display: flex; align-items: center; justify-content: center; }
.ti-cat__text { min-width: 0; display: flex; flex-direction: column; }
.ti-cat__name { font-weight: 700; color: var(--ti-ink); overflow-wrap: anywhere; transition: color .15s; }
.ti-cat__count { font-size: .85rem; color: #7d8c83; margin-top: .15rem; }

/* ═══════════════════════════════════════════════════════════════════
   FEATURES (ti-feature) — icon-left rows
   ═══════════════════════════════════════════════════════════════════ */
.ti-feature__head { max-width: 44rem; margin: 0 auto 2.75rem; text-align: center; }
.ti-feature__title { font-size: 1.9rem; font-weight: 800; color: var(--ti-ink); margin: 0 0 .6rem; }
.ti-feature__intro { font-size: 1.05rem; color: #5b6b63; margin: 0; }
.ti-feature__grid { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1.6rem; }
@media (min-width: 768px) { .ti-feature__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ti-feature__item { display: flex; gap: 1rem; min-width: 0; }
.ti-feature__icon { flex-shrink: 0; width: 3.25rem; height: 3.25rem; border-radius: .85rem; background: #EAF0EC; color: var(--ti-primary); display: flex; align-items: center; justify-content: center; }
.ti-feature__icon svg { color: var(--ti-primary); }
.ti-feature__body { min-width: 0; }
.ti-feature__name { font-size: 1.12rem; font-weight: 700; color: var(--ti-ink); margin: .15rem 0 .4rem; overflow-wrap: anywhere; }
.ti-feature__desc { color: #5b6b63; margin: 0; }

/* ═══════════════════════════════════════════════════════════════════
   FAQ (ti-faq)
   ═══════════════════════════════════════════════════════════════════ */
.ti-faq__head { text-align: center; margin: 0 auto 2.5rem; }
.ti-faq__title { font-size: 1.9rem; font-weight: 800; color: var(--ti-ink); margin: 0 0 .6rem; }
.ti-faq__intro { font-size: 1.05rem; color: #5b6b63; margin: 0; }
.ti-faq__list { display: flex; flex-direction: column; gap: .8rem; }
.ti-faq__item { background: #fff; border: 1px solid #ece5d6; border-radius: .8rem; overflow: hidden; }
.ti-faq-toggle { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-align: left; padding: 1.1rem 1.2rem; font-weight: 600; color: var(--ti-ink); background: transparent; border: 0; cursor: pointer; }
.ti-faq-toggle:hover { background: #faf7f0; }
.ti-faq__q { min-width: 0; overflow-wrap: anywhere; }
.ti-faq__chev { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: #9aa79f; transition: transform .2s; }
.ti-faq-toggle[aria-expanded="true"] .ti-faq__chev { transform: rotate(180deg); }
.ti-faq__panel { padding: 0 1.2rem 1.2rem; color: #5b6b63; }

/* ═══════════════════════════════════════════════════════════════════
   CTA (ti-cta)
   ═══════════════════════════════════════════════════════════════════ */
.ti-cta__title { font-size: 1.9rem; font-weight: 800; margin: 0 0 .8rem; }
.ti-cta__lead { font-size: 1.18rem; margin: 0 auto 1.8rem; max-width: 44ch; }
.ti-cta__btn { display: inline-flex; align-items: center; background: var(--ti-secondary); color: #21160a; font-weight: 700; font-size: 1.02rem; padding: .9rem 1.6rem; border-radius: .75rem; text-decoration: none; box-shadow: 0 10px 24px -10px rgba(0,0,0,.4); transition: background .15s, transform .15s; }
.ti-cta__btn:hover { background: #d9a942; transform: translateY(-1px); }
.ti-cta__note { margin-top: 1.4rem; font-size: .9rem; }

/* ═══════════════════════════════════════════════════════════════════
   LATEST + CARDS (ti-card)
   ═══════════════════════════════════════════════════════════════════ */
.ti-latest__head { text-align: center; max-width: 42rem; margin: 0 auto 2.75rem; }
.ti-latest__title { font-size: 1.9rem; font-weight: 800; color: var(--ti-ink); margin: 0 0 .6rem; }
.ti-latest__intro { font-size: 1.05rem; color: #5b6b63; margin: 0; }
.ti-latest__grid, .ti-archive__grid, .ti-related__grid {
  display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1.5rem;
}
@media (min-width: 640px) { .ti-latest__grid, .ti-archive__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ti-latest__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ti-archive__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ti-latest__more { text-align: center; margin-top: 3rem; }
.ti-related__grid { gap: 1.25rem; }
@media (min-width: 640px) { .ti-related__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .ti-related__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.ti-related__title { font-size: 1.6rem; font-weight: 800; color: var(--ti-ink); margin: 0 0 1.75rem; }

.ti-card { display: flex; flex-direction: column; min-width: 0; background: #fff; border: 1px solid #ece5d6; border-radius: .9rem; overflow: hidden; transition: box-shadow .2s, transform .2s, border-color .2s; }
.ti-card:hover { box-shadow: 0 16px 34px -18px rgba(27,67,50,.32); border-color: #e0d4bc; transform: translateY(-2px); }
.ti-card__top { padding: 1.25rem 1.25rem .5rem; min-width: 0; }
.ti-card__tag { display: inline-block; padding: .25rem .65rem; border-radius: 999px; font-size: .72rem; font-weight: 600; color: #fff; margin-bottom: .7rem; }
.ti-card__title { font-size: 1.05rem; font-weight: 700; line-height: 1.35; margin: 0 0 .5rem; min-width: 0; overflow-wrap: anywhere; }
.ti-card__title a { color: var(--ti-ink); text-decoration: none; transition: color .15s; }
.ti-card__excerpt { font-size: .9rem; color: #6b7c74; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ti-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.25rem; border-top: 1px solid #f1ebde; font-size: .85rem; }
.ti-card__downloads { display: inline-flex; align-items: center; color: #98a59c; }
.ti-card__link { color: var(--ti-primary); font-weight: 600; text-decoration: none; }
.ti-card__link:hover { color: var(--ti-secondary); }

.ti-card--sm { padding: 0; }
.ti-card--sm__link { display: block; padding: 1.1rem; text-decoration: none; }
.ti-card--sm__title { font-weight: 600; color: var(--ti-ink); margin: 0 0 .7rem; line-height: 1.35; overflow-wrap: anywhere; }
.ti-card--sm__foot { display: flex; align-items: center; justify-content: space-between; font-size: .85rem; color: #98a59c; }
.ti-card--sm__free { color: var(--ti-primary); font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════════
   COOKIE CONSENT (ti-consent) — IDs cookie-accept/cookie-decline preserved
   ═══════════════════════════════════════════════════════════════════ */
.ti-consent { position: fixed; bottom: 0; left: 0; right: 0; z-index: 60; background: #fff; border-top: 1px solid #e6ddc9; box-shadow: 0 -8px 24px -12px rgba(0,0,0,.25); padding: 1rem 0; }
.ti-consent__inner { display: flex; flex-direction: column; gap: 1rem; align-items: center; }
@media (min-width: 640px) { .ti-consent__inner { flex-direction: row; justify-content: space-between; } }
.ti-consent__text { font-size: .9rem; color: #5b6b63; min-width: 0; }
.ti-consent__link { color: var(--ti-primary); font-weight: 600; text-decoration: underline; }
.ti-consent__actions { display: flex; gap: .6rem; flex-shrink: 0; }
.ti-consent__btn { padding: .55rem 1.1rem; font-size: .88rem; font-weight: 600; border: 0; border-radius: .6rem; cursor: pointer; }
.ti-consent__btn--ghost { color: #41504a; background: #f1ece0; }
.ti-consent__btn--ghost:hover { background: #e7e0d0; }
.ti-consent__btn--solid { color: #fff; background: var(--ti-primary); }
.ti-consent__btn--solid:hover { background: var(--ti-primary-600); }

/* ═══════════════════════════════════════════════════════════════════
   SINGLE MODELLO (ti-shero / ti-single)
   ═══════════════════════════════════════════════════════════════════ */
.ti-shero { padding: 3.5rem 0; }
.ti-shero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem; align-items: center; }
@media (min-width: 1024px) { .ti-shero__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ti-shero__main { min-width: 0; }
.ti-shero__cat { display: inline-block; background: rgba(255,255,255,.14); color: #eef5f0; font-size: .82rem; font-weight: 600; padding: .3rem .85rem; border-radius: 999px; text-decoration: none; margin-bottom: 1rem; }
.ti-shero__cat:hover { background: rgba(255,255,255,.24); }
.ti-shero__title { font-size: clamp(1.9rem, 3.8vw, 3rem); font-weight: 800; line-height: 1.1; margin: 0 0 1rem; overflow-wrap: anywhere; }
.ti-shero__lead { font-size: 1.12rem; color: #e3eee8; margin: 1rem 0 1.5rem; max-width: 52ch; }
.ti-shero__facts { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-bottom: 1.75rem; }
.ti-shero__fact { display: inline-flex; align-items: center; color: #d8e6dd; font-size: .92rem; }
.ti-shero__download { display: inline-flex; align-items: center; background: var(--ti-secondary); color: #21160a; font-weight: 700; font-size: 1.05rem; padding: .95rem 1.7rem; border-radius: .8rem; text-decoration: none; box-shadow: 0 12px 26px -10px rgba(201,150,46,.6); transition: background .15s, transform .15s; }
.ti-shero__download:hover { background: #d9a942; transform: translateY(-1px); }
.ti-shero__aside { min-width: 0; }
.ti-shero__shot { border-radius: .9rem; overflow: hidden; box-shadow: 0 28px 60px -22px rgba(0,0,0,.55); border: 1px solid rgba(255,255,255,.18); }
@media (max-width: 1023px) { .ti-shero__aside { display: none; } }

/* hero byline (E-E-A-T) */
.ti-byline { display: flex; flex-wrap: wrap; gap: 1.1rem 1.6rem; margin: 0 0 1.3rem; }
.ti-byline__item { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.ti-byline__avatar { flex-shrink: 0; display: inline-flex; }
.ti-byline__avatar img { width: 36px; height: 36px; border-radius: 999px; max-width: none; align-self: center; border: 2px solid rgba(255,255,255,.35); }
.ti-byline__text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.ti-byline__role { color: #cfe0d5; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; }
.ti-byline__name { color: #fff; font-weight: 700; font-size: .95rem; }

.ti-single__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; }
@media (min-width: 1024px) { .ti-single__grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
.ti-single__content { min-width: 0; }
.ti-single__side { min-width: 0; }
.ti-single__sticky { position: sticky; top: 6rem; display: flex; flex-direction: column; gap: 1.25rem; }
.ti-block__title { font-size: 1.5rem; font-weight: 800; color: var(--ti-ink); margin: 0 0 1.1rem; }

.ti-benefits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .9rem; }
.ti-benefits__item { display: flex; align-items: flex-start; gap: .75rem; min-width: 0; }
.ti-benefits__check { width: 1.5rem; height: 1.5rem; flex-shrink: 0; margin-top: .1rem; color: var(--ti-secondary); }
.ti-benefits__item span { color: #41504a; min-width: 0; overflow-wrap: anywhere; }

.ti-funcs { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: .8rem; }
@media (min-width: 768px) { .ti-funcs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ti-funcs__item { display: flex; align-items: center; gap: .7rem; min-width: 0; background: var(--ti-cream); border: 1px solid #ece2cf; border-radius: .65rem; padding: .85rem 1rem; }
.ti-funcs__icon { width: 1.25rem; height: 1.25rem; flex-shrink: 0; color: var(--ti-primary); }
.ti-funcs__item span { color: #41504a; min-width: 0; overflow-wrap: anywhere; }

/* author box / team */
.ti-authors { background: var(--ti-cream); border: 1px solid #ece2cf; border-radius: 1rem; padding: 1.75rem; }
.ti-authors__title { font-size: 1.35rem; font-weight: 800; color: var(--ti-ink); margin: 0 0 1.25rem; }
.ti-authors__grid, .ti-team { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 1.25rem; }
@media (min-width: 640px) { .ti-authors__grid, .ti-team { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ti-authors__disclaimer { margin: 1.25rem 0 0; font-size: .85rem; color: #7d8c83; font-style: italic; }
.ti-author { display: flex; gap: 1rem; min-width: 0; }
.ti-author__avatar { flex-shrink: 0; display: inline-flex; }
.ti-author__avatar img { width: 96px; height: 96px; border-radius: 999px; max-width: none; align-self: center; border: 3px solid #fff; box-shadow: 0 6px 16px -8px rgba(27,67,50,.4); }
.ti-author__body { min-width: 0; }
.ti-author__name { font-weight: 700; font-size: 1.05rem; color: var(--ti-ink); margin: 0; }
.ti-author__role { font-size: .85rem; font-weight: 600; color: var(--ti-secondary-600); margin: .1rem 0 .5rem; overflow-wrap: anywhere; }
.ti-author__bio { font-size: .9rem; color: #5b6b63; margin: 0; overflow-wrap: anywhere; }

/* download card / category box */
.ti-dlcard { background: #fff; border: 1px solid #ece5d6; border-radius: .9rem; box-shadow: 0 12px 28px -18px rgba(27,67,50,.3); padding: 1.5rem; }
.ti-dlcard__title { font-size: 1.1rem; font-weight: 700; color: var(--ti-ink); margin: 0 0 1rem; }
.ti-dlcard__specs { margin: 0 0 1.25rem; }
.ti-dlcard__row { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; font-size: .85rem; padding: .35rem 0; }
.ti-dlcard__row dt { color: #7d8c83; margin: 0; }
.ti-dlcard__row dd { margin: 0; font-weight: 600; color: var(--ti-ink); text-align: right; min-width: 0; overflow-wrap: anywhere; }
.ti-dlcard__free { color: var(--ti-primary) !important; }
.ti-dlcard__btn { width: 100%; display: inline-flex; align-items: center; justify-content: center; background: var(--ti-secondary); color: #21160a; font-weight: 700; padding: .8rem 1rem; border-radius: .7rem; text-decoration: none; transition: background .15s; }
.ti-dlcard__btn:hover { background: #d9a942; }
.ti-catbox { background: var(--ti-cream); border: 1px solid #ece2cf; border-radius: .9rem; padding: 1.5rem; }
.ti-catbox__title { font-size: 1.1rem; font-weight: 700; color: var(--ti-ink); margin: 0 0 1rem; }
.ti-catbox__link { display: flex; align-items: center; gap: .85rem; min-width: 0; background: #fff; border-radius: .7rem; padding: .85rem; text-decoration: none; transition: box-shadow .15s; }
.ti-catbox__link:hover { box-shadow: 0 8px 18px -10px rgba(27,67,50,.3); }
.ti-catbox__icon { flex-shrink: 0; width: 2.5rem; height: 2.5rem; border-radius: .6rem; background: #EAF0EC; display: flex; align-items: center; justify-content: center; }
.ti-catbox__text { min-width: 0; display: flex; flex-direction: column; }
.ti-catbox__name { font-weight: 600; color: var(--ti-ink); overflow-wrap: anywhere; }
.ti-catbox__count { font-size: .82rem; color: #7d8c83; }

/* ═══════════════════════════════════════════════════════════════════
   ARCHIVE (ti-archive)
   ═══════════════════════════════════════════════════════════════════ */
.ti-ahero { padding: 3rem 0; }
.ti-ahero__title { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; margin: 0 0 .8rem; overflow-wrap: anywhere; }
.ti-ahero__lead { font-size: 1.12rem; color: #e3eee8; margin: 0; max-width: 60ch; }
.ti-archive__layout { display: flex; flex-direction: column; gap: 2rem; }
@media (min-width: 1024px) { .ti-archive__layout { flex-direction: row; } }
.ti-archive__side { flex-shrink: 0; }
@media (min-width: 1024px) { .ti-archive__side { width: 16rem; } }
.ti-archive__sticky { position: sticky; top: 6rem; display: flex; flex-direction: column; gap: 1.5rem; }
.ti-archive__main { flex: 1; min-width: 0; }
.ti-archive__bar { margin-bottom: 1.5rem; color: #5b6b63; }
.ti-panel { background: #fff; border: 1px solid #ece5d6; border-radius: .9rem; padding: 1.1rem 1.2rem; }
.ti-panel__title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ti-ink); margin: 0 0 .8rem; }
.ti-panel__input { width: 100%; min-width: 0; padding: .6rem .9rem; border: 1px solid #e3dbc9; border-radius: .6rem; outline: none; }
.ti-panel__input:focus { border-color: var(--ti-secondary); box-shadow: 0 0 0 3px rgba(201,150,46,.2); }
.ti-filter { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .2rem; }
.ti-filter__link { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .75rem; border-radius: .55rem; text-decoration: none; color: #41504a; min-width: 0; }
.ti-filter__link:hover { background: #faf7f0; }
.ti-filter__link.is-active { background: #EAF0EC; color: var(--ti-primary); font-weight: 600; }
.ti-filter__link > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.ti-filter__count { flex-shrink: 0; font-size: .82rem; color: #98a59c; }
.ti-archive__empty { text-align: center; padding: 3rem 1rem; }

/* ═══════════════════════════════════════════════════════════════════
   ABOUT / HOW-WE-WORK (ti-howwork)
   ═══════════════════════════════════════════════════════════════════ */
.ti-howwork { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 2rem; }
@media (min-width: 768px) { .ti-howwork { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.ti-howwork__item { display: flex; gap: 1rem; min-width: 0; }
.ti-howwork__icon { flex-shrink: 0; width: 3rem; height: 3rem; border-radius: .7rem; display: flex; align-items: center; justify-content: center; }
.ti-howwork__icon--green { background: #EAF0EC; color: var(--ti-primary); }
.ti-howwork__icon--gold { background: #F6ECD6; color: var(--ti-secondary-600); }
.ti-howwork__item > div { min-width: 0; }

/* ═══════════════════════════════════════════════════════════════════
   FOOTER (ti-footer)
   ═══════════════════════════════════════════════════════════════════ */
.ti-footer { background: #122a20; color: #c6d3cb; }
.ti-footer__brand { margin-bottom: 2.5rem; }
.ti-footer__tagline { margin: 1rem 0 0; max-width: 40ch; font-size: .92rem; color: #9fb1a6; }
.ti-footer__cols { display: grid; grid-template-columns: repeat(1, minmax(0, 1fr)); gap: 2rem; }
@media (min-width: 640px) { .ti-footer__cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ti-footer__heading { color: #fff; font-weight: 700; font-size: .95rem; margin: 0 0 1rem; }
.ti-footer__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.ti-footer__list a { color: #c6d3cb; text-decoration: none; transition: color .15s; overflow-wrap: anywhere; }
.ti-footer__list a:hover { color: var(--ti-secondary); }
.ti-footer__bottom { margin-top: 2.5rem; padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: .5rem; }
@media (min-width: 768px) { .ti-footer__bottom { flex-direction: row; align-items: center; justify-content: space-between; } }
.ti-footer__copy { font-size: .85rem; color: #9fb1a6; margin: 0; }
.ti-footer__note { font-size: .85rem; color: #80958a; margin: 0; }
/* footer widget fallbacks (if a sidebar widget is dropped in) */
.ti-footer .widget-title { color: #fff; }
.ti-footer .widget a { color: #c6d3cb; }
.ti-footer .widget a:hover { color: var(--ti-secondary); }

/* ═══════════════════════════════════════════════════════════════════
   MOBILE-SAFE AVATARS + GRID GUARDS (known bugs to avoid)
   img{max-width:100%} squashes avatars inside flex; grids must use
   minmax(0,1fr) and text children must allow shrink. No horizontal
   overflow at 390px.
   ═══════════════════════════════════════════════════════════════════ */
.ti-byline__avatar img,
.ti-author__avatar img,
.avatar { max-width: none; align-self: center; }
.ti-byline__avatar,
.ti-author__avatar { flex-shrink: 0; }
[class*="__avatar"] { flex-shrink: 0; }

/* generic flex text-child guard */
.ti-cat__text, .ti-feature__body, .ti-catbox__text, .ti-howwork__item > div { min-width: 0; }

