/* =============================================
   PAGE-SPECIFIC STYLES
   Custom styles for individual pages
============================================= */

/* ===== AGENTI PAGE ===== */
.page-agenti {
    padding-top: 40px;
}

.quiet-panel.caution.desktop-only {
    margin: 0 0 28px;
    border-left: 6px solid var(--color-stamp-red);
}

.info-panel.agenti-orientation {
    margin: 28px 0 34px;
    border: 3px solid var(--color-accent);
    background: #FCFCFA;
}

.info-panel.agenti-orientation .path-label {
    margin-bottom: 14px;
}

.info-panel.agenti-orientation h2 {
    margin-top: 0;
    margin-bottom: 14px;
}

.info-panel.agenti-orientation > p {
    margin-bottom: 18px;
}

.info-panel.agenti-orientation .feature-pill-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0;
}

.feature-pill.agenti-pill {
    align-items: flex-start;
    padding: 20px 22px;
}

.feature-pill.agenti-pill strong {
    display: block;
    margin-bottom: 8px;
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.feature-pill.agenti-pill span {
    display: block;
    font-family: var(--font-main);
    font-size: 0.96rem;
    font-weight: 500;
    line-height: 1.68;
    color: var(--color-text-ink);
}

.path-label.with-margin {
    margin-bottom: 10px;
}

/* ===== EASTER EGG EFFECT (IMPARA PAGE) ===== */
.easter-egg-card {
    transition: all 0.3s ease;
}

.easter-egg-card:hover {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    background: #0a0a0a;
    color: #00ff00;
    border-left-color: #00ff00 !important;
    letter-spacing: 0.02em;
}

.easter-egg-card:hover strong {
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.easter-egg-card:hover a {
    color: #ff00ff;
    text-decoration: underline;
}

.easter-egg-card:hover::before {
    content: '> ';
    color: #00ff00;
}

/* ===== APPLICA PAGE - COLLAPSIBLE SECTIONS ===== */
.collapsible-section {
    border: 4px solid #000;
    margin: 30px 0;
    background: #fff;
}

.collapsible-header {
    padding: 20px;
    background: #000;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 18px;
}

.collapsible-header:hover {
    background: #333;
}

.collapsible-indicator {
    font-size: 24px;
    transition: transform 0.3s;
}

.collapsible-indicator.open {
    transform: rotate(180deg);
}

.collapsible-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-content.open {
    max-height: 5000px;
    transition: max-height 0.5s ease-in;
}

.collapsible-inner {
    padding: 30px;
}

/* ===== APPLICA PAGE - PLATFORM GRID ===== */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 0 0 24px;
}

.platform-button {
    border: 4px solid #000;
    background: #fff;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Raleway', sans-serif;
    text-align: left;
}

.platform-button:hover {
    background: #f0f0f0;
}

.platform-button.active {
    background: #000;
    color: #fff;
}

.platform-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.platform-name {
    font-family: 'JetBrains Mono', monospace;
    font-weight: 700;
    font-size: 18px;
}

.platform-button.active .platform-name {
    color: #fff;
}

.platform-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    color: #000;
}

.platform-button.active .platform-icon {
    color: #fff;
}

.platform-desc {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: #555;
    margin-top: 10px;
}

.platform-button.active .platform-desc {
    color: #ccc;
}

/* ===== APPLICA PAGE - PROMPT AREA ===== */
.prompt-area {
    margin-top: 32px;
}

.prompt-textarea {
    width: 100%;
    min-height: 220px;
    padding: 24px;
    border: 3px solid var(--color-border);
    font-family: var(--font-main);
    font-size: 1.05rem;
    line-height: 1.65;
    background: #FFFFFF;
    margin-bottom: 20px;
    border-left: 6px solid var(--color-accent);
}

.prompt-textarea:focus {
    outline: none;
    border-color: var(--color-accent);
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.prompt-pill {
    appearance: none;
    border: 2px solid var(--color-border);
    background: #FFFFFF;
    padding: 10px 16px;
    cursor: pointer;
    font-family: var(--font-legal);
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.18s ease;
    color: var(--color-accent);
}

.prompt-pill:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-paper);
    transform: translateY(-2px);
}

.status-box {
    margin: 24px 0;
    padding: 18px;
    border: 2px dashed var(--color-border);
    background: #FCFCFA;
    font-family: var(--font-legal);
    font-size: 0.9rem;
    line-height: 1.6;
}

.status-box strong {
    text-transform: uppercase;
    margin-right: 12px;
    color: var(--color-stamp-red);
}

/* ===== INDEX PAGE - HERO & CARDS ===== */
.hero-section {
    text-align: center;
    margin-bottom: 80px;
    padding: 50px 30px;
    border: 4px solid var(--color-text-ink);
    background: #fff;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.08);
    position: relative;
}

.hero-section::before {
    display: none;
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 120px;
    height: 120px;
    border: 3px solid var(--color-stamp-red);
    border-radius: 50%;
    opacity: 0.15;
}

.hero-section h1 {
    font-family: var(--font-legal);
    font-size: 3.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 0;
    line-height: 1.1;
    position: relative;
}

.hero-section h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #1A1A18;
}

.tagline {
    background: var(--color-bg-folder);
    border-left: 4px solid var(--color-stamp-red);
    padding: 20px 25px;
    margin: 40px 0;
    font-size: 1.15rem;
    font-weight: 500;
    font-style: italic;
    color: var(--color-text-gray);
    line-height: 1.6;
}

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

.cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 0;
}

#btn-osserva { order: 1; }
#osserva-content { order: 2; grid-column: 1 / -1; }
#btn-impara { order: 1; }
#impara-content { order: 2; grid-column: 1 / -1; }
#btn-applica { order: 1; }
#applica-content { order: 2; grid-column: 1 / -1; }
#btn-crea { order: 1; }
#crea-content { order: 2; grid-column: 1 / -1; }

.card-button {
    background: #fff;
    border: 4px solid var(--color-text-ink);
    padding: 40px 20px;
    font-family: var(--font-legal);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text-ink);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card-button.active {
    background: var(--color-text-ink);
    color: #fff;
}

.card-content {
    display: none;
    padding: 40px;
    background: #fff;
    border: 4px solid var(--color-border);
}

.card-content.active {
    display: block;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .hero-section {
        padding: 30px 20px;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

    .card-button {
        padding: 24px 16px;
        font-size: 1rem;
    }

    .collapsible-section {
        margin: 20px 0;
    }

    .collapsible-header {
        padding: 16px;
        font-size: 16px;
    }

    .collapsible-inner {
        padding: 20px;
    }

    .platform-grid {
        grid-template-columns: 1fr;
    }

    .prompt-textarea {
        min-height: 150px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 20px 16px;
    }

    .hero-section h1 {
        font-size: 2rem;
        letter-spacing: 0;
    }

    .cards-container {
        gap: 12px;
    }

    .card-button {
        padding: 20px 12px;
        font-size: 0.9rem;
    }

    .collapsible-header {
        padding: 12px;
        font-size: 14px;
    }

    .collapsible-inner {
        padding: 16px;
    }

    .prompt-textarea {
        min-height: 120px;
        padding: 12px;
        font-size: 0.95rem;
    }
}

/* =============================================
   STATIC HTML PAGE STYLES
   Styles for content pasted from .txt files
============================================= */

/* Section Navigation (sticky tabs) */
.section-nav {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 4px solid #000;
    z-index: 100;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.section-nav-inner {
    display: flex;
    min-width: min-content;
    padding: 0;
}

.section-nav-link {
    flex: 1;
    min-width: max-content;
    padding: 16px 20px;
    border: none;
    border-right: 2px solid #000;
    background: #fff;
    font-family: var(--font-legal);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.section-nav-link:last-child {
    border-right: none;
}

.section-nav-link:hover {
    background: #f0f0f0;
}

.section-nav-link.active {
    background: #000;
    color: #fff;
}

/* OSSERVA collapsible sections (single-open accordion behavior) */
[id^="page-osserva"] .collapsible-section {
    position: relative;
    border: 4px solid #000;
    margin: 40px 0 20px 0;
    background: #fff;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
}

[id^="page-osserva"] .collapsible-section.open {
    max-height: 10000px;
    opacity: 1;
    margin: 40px 0 20px 0;
}

[id^="page-osserva"] .collapsible-section.closed {
    margin: 0;
}

[id^="page-osserva"] .collapsible-section:last-of-type.open {
    margin-bottom: 40px;
}

[id^="page-osserva"] .section-content {
    padding: 30px 20px;
}

/* Dossier Index Panel */
.dossier-index-panel {
    border: 4px solid #000;
    border-top: none;
    background: #f8f8f5;
}

.dossier-index-meta {
    display: flex;
    border-bottom: 2px solid #000;
    overflow-x: auto;
}

.dossier-meta-field {
    flex: 1;
    min-width: max-content;
    padding: 10px 20px;
    font-family: var(--font-legal);
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-right: 1px solid #ccc;
    color: #666;
}

.dossier-meta-field:last-child {
    border-right: none;
}

.dossier-index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.dossier-index-item {
    padding: 28px 22px;
    border-right: 2px solid #000;
    cursor: pointer;
    transition: background 0.18s, color 0.18s;
}

.dossier-index-item:last-child {
    border-right: none;
}

.dossier-index-item:hover {
    background: #fff;
}

.dossier-index-num {
    display: block;
    font-family: var(--font-legal);
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-stamp-red);
}

.dossier-index-title {
    display: block;
    font-family: var(--font-legal);
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.dossier-index-desc {
    display: block;
    font-size: 14px;
    line-height: 1.5;
    color: #666;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 50px;
    height: 50px;
    background: #000;
    color: #fff;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: opacity 0.3s;
    z-index: 90;
}

.back-to-top.visible {
    display: flex;
}

.back-to-top:hover {
    opacity: 0.8;
}

/* Compliance and Alert Boxes */
.compliance-box {
    border: 4px solid #000;
    padding: 24px;
    margin: 30px 0;
    background: #f8f8f5;
}

.compliance-box h3 {
    margin-top: 0;
    font-family: var(--font-legal);
    font-size: 18px;
}

.compliance-box.caution {
    border-color: var(--color-stamp-red);
    background: #fff5f5;
}

.compliance-box.art96-box {
    border-color: #003366;
    background: #f0f7ff;
}

/* Activity Grid and Boxes */
.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.activity-box {
    border: 3px solid #000;
    padding: 20px;
    background: #fff;
}

.activity-box h3 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 700;
}

.activity-box.caution {
    border-color: var(--color-stamp-red);
    background: #fff5f5;
}

/* Alert Boxes */
.alert-box {
    padding: 16px 20px;
    margin: 20px 0;
    border-left: 6px solid #000;
    background: #f8f8f5;
}

.alert-box.alert-success {
    border-left-color: #10B981;
    background: #f0fdf4;
}

.alert-box.alert-warning {
    border-left-color: #F59E0B;
    background: #fffbeb;
}

/* Disclaimer Note */
.disclaimer-note {
    font-size: 13px;
    color: #666;
    font-style: italic;
    margin: 20px 0;
    padding: 12px;
    background: #f8f8f5;
    border-left: 4px solid #ccc;
}

/* CTA Suggestion */
.cta-suggestion {
    text-align: center;
    padding: 24px;
    margin: 30px 0;
    background: #f8f8f5;
    border: 3px solid #000;
}

/* Download Actions */
.download-actions {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

.download-pdf-btn,
.download-txt-btn {
    padding: 10px 20px;
    border: 2px solid #000;
    background: #fff;
    font-family: var(--font-legal);
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.download-pdf-btn:hover,
.download-txt-btn:hover {
    background: #f0f0f0;
}

/* Check List */
.check-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.check-list li {
    padding-left: 30px;
    position: relative;
    margin-bottom: 12px;
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10B981;
    font-weight: 700;
}

/* Responsive for Static Content */
@media (max-width: 768px) {
    .dossier-index-grid {
        grid-template-columns: 1fr;
    }
    
    .dossier-index-item {
        border-right: none;
        border-bottom: 2px solid #000;
    }
    
    .dossier-index-item:last-child {
        border-bottom: none;
    }
    
    .section-nav-link {
        padding: 14px 16px;
        font-size: 13px;
    }
    
    .activity-grid {
        grid-template-columns: 1fr;
    }
    
    .download-actions {
        flex-direction: column;
    }
    
    .download-pdf-btn,
    .download-txt-btn {
        width: 100%;
    }
}

/* =============================================
   INDEX/HOME PAGE STYLES
   Hero section, cards, dividers from static HTML
============================================= */

.hero-section {
    text-align: center;
    margin-bottom: 80px;
    padding: 50px 30px;
    border: 4px solid var(--color-text-ink);
    background: #fff;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.08);
    position: relative;
}

.hero-section::before {
    display: none;
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 120px;
    height: 120px;
    border: 3px solid var(--color-stamp-red);
    border-radius: 50%;
    opacity: 0.15;
}

.hero-section h1 {
    font-family: var(--font-legal);
    font-size: 3.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -2px;
    margin-bottom: 0;
    line-height: 1.1;
    position: relative;
}

.hero-section h1::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: #1A1A1A18;
}

.tagline {
    background: var(--color-bg-folder);
    border-left: 4px solid var(--color-stamp-red);
    padding: 20px 25px;
    margin: 40px 0;
    font-size: 1.15rem;
    font-weight: 500;
    font-style: italic;
    color: var(--color-text-gray);
    line-height: 1.6;
}

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

.cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 0;
}

#btn-osserva { order: 1; }
#osserva-content { order: 2; grid-column: 1 / -1; }
#btn-impara { order: 1; }
#impara-content { order: 2; grid-column: 1 / -1; }
#btn-applica { order: 1; }
#applica-content { order: 2; grid-column: 1 / -1; }
#btn-crea { order: 1; }
#crea-content { order: 2; grid-column: 1 / -1; }

.card-button {
    background: #fff;
    border: 4px solid var(--color-text-ink);
    padding: 40px 20px;
    font-family: var(--font-legal);
    font-size: 1.15rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.08);
    width: 100%;
}

.card-button:hover {
    background: var(--color-bg-folder);
    transform: translateY(-2px);
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.12);
}

.card-button.active {
    background: var(--color-text-ink);
    color: var(--color-bg-paper);
    box-shadow: 6px 6px 0 var(--color-stamp-red);
}

.card-button::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #1A1A18;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card-button.active::before {
    opacity: 1;
}

.card-button::after {
    content: '↓';
    position: absolute;
    right: 15px;
    bottom: 15px;
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: var(--color-stamp-red);
}

.card-button.active::after {
    transform: rotate(180deg);
    color: var(--color-bg-paper);
}

.expandable-content {
    display: none;
    background: #fff;
    border: 4px solid var(--color-text-ink);
    border-left: 8px solid var(--color-stamp-red);
    padding: 30px;
    margin-top: 20px;
    box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.08);
    position: relative;
}

.expandable-content.active {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.expandable-content p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--color-text-ink);
}

.section {
    margin-bottom: 80px;
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    width: 2px;
    height: 100%;
    background: var(--color-margin-line);
}

.section h2 {
    font-family: var(--font-legal);
    font-size: 2rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 30px;
    border-bottom: 4px solid var(--color-text-ink);
    padding-bottom: 15px;
    position: relative;
    letter-spacing: -1px;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 120px;
    height: 4px;
    background: #1A1A18;
}

.section h3 {
    font-family: var(--font-main);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 35px 0 20px;
    color: var(--color-text-ink);
    position: relative;
}

.section p {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 20px;
    color: var(--color-text-ink);
}

.section p strong {
    color: var(--color-stamp-red);
    font-weight: 600;
}

.section ul {
    margin: 25px 0;
    padding-left: 0;
    list-style: none;
}

.section ul li {
    font-size: 1.1rem;
    line-height: 1.9;
    margin-bottom: 12px;
    padding-left: 30px;
    position: relative;
}

.section ul li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-stamp-red);
    font-weight: 700;
}

.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-border) 20%, var(--color-border) 80%, transparent);
    margin: 80px 0;
    position: relative;
}

.divider::before {
    content: '///';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--color-bg-paper);
    padding: 0 20px;
    font-family: var(--font-legal);
    color: var(--color-stamp-red);
    font-size: 1rem;
}

/* Mobile responsive for index/home styles */
@media (max-width: 768px) {
    .hero-section {
        padding: 34px 22px;
        margin-bottom: 56px;
        box-shadow: 4px 4px 0 rgba(0, 0, 0, 0.08);
    }
    
    .hero-section h1 {
        font-size: 1.85rem;
        letter-spacing: -1px;
    }
    
    .hero-section h1::after {
        width: 60px;
        height: 2px;
    }
    
    .tagline {
        padding: 18px 20px;
        font-size: 1.05rem;
        margin: 34px 0 42px;
        line-height: 1.75;
    }
    
    .cards-container {
        grid-template-columns: 1fr;
        gap: 14px;
    }
    
    #btn-osserva { order: 1; }
    #osserva-content { order: 2; }
    #btn-impara { order: 3; }
    #impara-content { order: 4; }
    #btn-applica { order: 5; }
    #applica-content { order: 6; }
    #btn-crea { order: 7; }
    #crea-content { order: 8; }
    
    .card-button {
        font-size: 0.92rem;
        padding: 24px 18px 28px;
        box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.08);
    }
    
    .card-button.active {
        box-shadow: 4px 4px 0 #1A1A18;
    }
    
    .card-button::after {
        font-size: 1.2rem;
        right: 10px;
        bottom: 10px;
    }
    
    .expandable-content {
        padding: 24px 18px;
        margin-top: 12px;
        border-width: 3px;
        border-left-width: 6px;
        box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.08);
    }
    
    .expandable-content p {
        font-size: 1rem;
        line-height: 1.75;
    }
    
    .section {
        margin-bottom: 68px;
    }
    
    .section::before {
        left: -10px;
    }
    
    .section h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
        padding-bottom: 12px;
        border-bottom-width: 3px;
    }
    
    .section h2::after {
        width: 80px;
        height: 3px;
    }
    
    .section h3 {
        font-size: 1.2rem;
        margin: 25px 0 15px;
    }
    
    .section p,
    .section ul li {
        font-size: 1rem;
        line-height: 1.75;
        margin-bottom: 16px;
    }
    
    .divider {
        margin: 60px 0;
    }
    
    .divider::before {
        font-size: 0.9rem;
        padding: 0 15px;
    }
}

/* =============================================
   V41.2.9 HOMEPAGE CARD SCALE REBALANCE
   Preserve card hierarchy while reducing oversized typography.
============================================= */

.cards-section .cards-container .card-button {
    appearance: none;
    background: #F4F4F1;
    border: 4px solid var(--color-text-ink);
    padding: 52px 34px 48px;
    font-family: var(--font-legal);
    font-size: 1rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    text-align: left;
    line-height: 1.3;
    position: relative;
    min-height: 320px;
    box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.08);
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.cards-section .cards-container #btn-osserva {
    border-color: var(--color-accent);
}

.cards-section .cards-container .card-button .card-index {
    display: block;
    margin-bottom: 22px;
    color: var(--color-text-gray);
    font-size: 1.05rem;
    letter-spacing: 0.03em;
}

.cards-section .cards-container .card-button .card-title {
    display: block;
    margin-bottom: 16px;
    color: var(--color-text-ink);
    font-size: 2.35rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.cards-section .cards-container .card-button .card-note {
    display: block;
    max-width: none;
    color: var(--color-text-gray);
    font-family: var(--font-main);
    font-size: 1.15rem;
    font-weight: 500;
    line-height: 1.42;
    text-transform: none;
    letter-spacing: 0;
}

.cards-section .cards-container .card-button::after {
    content: '↓';
    position: absolute;
    right: 24px;
    bottom: 16px;
    color: var(--color-text-ink);
    font-size: 2.3rem;
    font-weight: 400;
    line-height: 1;
    transform: none;
    transition: none;
}

.cards-section .cards-container .card-button:hover {
    transform: translateY(-2px);
    border-color: var(--color-accent);
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.1);
}

.cards-section .cards-container .card-button.active {
    background: #F4F4F1;
    color: inherit;
    border-color: var(--color-accent);
    box-shadow: 10px 10px 0 rgba(0, 0, 0, 0.1);
}

.cards-section .cards-container .card-button.active::after {
    color: var(--color-text-ink);
    transform: none;
}

.cards-section .cards-container .card-button.active .card-index,
.cards-section .cards-container .card-button.active .card-title,
.cards-section .cards-container .card-button.active .card-note {
    color: inherit;
}

@media (max-width: 980px) {
    .cards-section .cards-container .card-button {
        padding: 40px 26px 42px;
        min-height: 280px;
    }

    .cards-section .cards-container .card-button .card-index {
        margin-bottom: 14px;
        font-size: 0.92rem;
    }

    .cards-section .cards-container .card-button .card-title {
        margin-bottom: 12px;
        font-size: 1.85rem;
    }

    .cards-section .cards-container .card-button .card-note {
        font-size: 1rem;
    }

    .cards-section .cards-container .card-button::after {
        right: 18px;
        bottom: 14px;
        font-size: 1.95rem;
    }
}

@media (max-width: 768px) {
    .cards-section .cards-container .card-button {
        min-height: 240px;
        padding: 30px 20px 32px;
    }

    .cards-section .cards-container .card-button .card-index {
        margin-bottom: 12px;
        font-size: 0.84rem;
    }

    .cards-section .cards-container .card-button .card-title {
        margin-bottom: 10px;
        font-size: 1.45rem;
        letter-spacing: 0.05em;
    }

    .cards-section .cards-container .card-button .card-note {
        max-width: none;
        font-size: 0.98rem;
        line-height: 1.5;
    }

    .cards-section .cards-container .card-button::after {
        right: 14px;
        bottom: 10px;
        font-size: 1.6rem;
    }
}
