/**
 * Governance Page Styles
 * Uses Astra theme CSS variables for consistent design
 */

/* ==========================================================================
   CSS Custom Properties - Page specific
   ========================================================================== */
:root {
    --gov-max-width: 1200px;
    --gov-spacing-xs: 0.5rem;
    --gov-spacing-sm: 1rem;
    --gov-spacing-md: 1.5rem;
    --gov-spacing-lg: 2rem;
    --gov-spacing-xl: 3rem;
    --gov-spacing-2xl: 4rem;
    --gov-spacing-3xl: 6rem;
    --gov-border-radius: 8px;
    --gov-border-radius-lg: 12px;
    --gov-transition: 0.2s ease;
}

/* ==========================================================================
   Base Layout & Typography
   ========================================================================== */
.governance-page {
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

.governance-page .site-main {
    padding: 0;
}

/* Source Sans 3 font for the entire governance page */
.governance-page,
.governance-page h1,
.governance-page h2,
.governance-page h3,
.governance-page h4,
.governance-page h5,
.governance-page h6,
.governance-page p,
.governance-page span,
.governance-page a,
.governance-page li,
.governance-page td,
.governance-page th,
.governance-page strong,
.governance-page button,
.governance-page input,
.governance-page .gov-hero-title,
.governance-page .gov-section-title,
.governance-page .gov-cta-title {
    font-family: 'Source Sans 3', 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.gov-container {
    max-width: var(--gov-max-width);
    margin: 0 auto;
    padding: 0 var(--gov-spacing-md);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.gov-hero {
    background: linear-gradient(135deg, var(--ast-global-color-5) 0%, #E8F0F8 100%);
    padding: var(--gov-spacing-3xl) 0;
    text-align: center;
}

.gov-eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ast-global-color-0);
    background: rgba(4, 107, 210, 0.1);
    padding: var(--gov-spacing-xs) var(--gov-spacing-sm);
    border-radius: 100px;
    margin-bottom: var(--gov-spacing-md);
}

.gov-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--ast-global-color-2);
    margin: 0 0 var(--gov-spacing-md);
    line-height: 1.2;
}

.gov-hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--ast-global-color-3);
    max-width: 800px;
    margin: 0 auto var(--gov-spacing-xl);
    line-height: 1.6;
}

.gov-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gov-spacing-lg);
}

.gov-meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--gov-spacing-xs);
    padding: var(--gov-spacing-sm) var(--gov-spacing-md);
    background: var(--ast-global-color-4);
    border-radius: var(--gov-border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.gov-meta-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--ast-global-color-3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.gov-meta-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ast-global-color-2);
}

/* ==========================================================================
   STATUS BAR
   ========================================================================== */
.gov-status-bar {
    background: #FFF8E6;
    border-top: 1px solid #F5DFA8;
    border-bottom: 1px solid #F5DFA8;
    padding: var(--gov-spacing-md) 0;
}

.gov-status-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gov-spacing-sm);
    flex-wrap: wrap;
}

.gov-status-icon {
    color: #B8860B;
    display: flex;
    align-items: center;
}

.gov-status-text {
    font-size: 0.9375rem;
    color: #8B6914;
}

.gov-status-text strong {
    font-weight: 600;
}

.gov-status-note {
    text-align: center;
    font-size: 0.8125rem;
    color: #8B6914;
    margin: var(--gov-spacing-xs) 0 0;
    opacity: 0.85;
}

/* ==========================================================================
   SECTION TITLES (shared)
   ========================================================================== */
.gov-section-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--ast-global-color-2);
    margin: 0 0 var(--gov-spacing-md);
}

.gov-section-desc {
    font-size: 1rem;
    color: var(--ast-global-color-3);
    line-height: 1.7;
    margin: 0 0 var(--gov-spacing-md);
}

/* ==========================================================================
   RULEBOOK SECTION
   ========================================================================== */
.gov-rulebook {
    padding: var(--gov-spacing-3xl) 0;
    background: var(--ast-global-color-4);
}

.gov-rulebook-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gov-spacing-xl);
}

@media (min-width: 992px) {
    .gov-rulebook-grid {
        grid-template-columns: 1fr 380px;
        gap: var(--gov-spacing-2xl);
    }
}

.gov-principles-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--ast-global-color-2);
    margin: var(--gov-spacing-xl) 0 var(--gov-spacing-md);
}

.gov-principles-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gov-spacing-md);
}

.gov-principle-item {
    display: flex;
    gap: var(--gov-spacing-md);
    padding: var(--gov-spacing-md);
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius);
    transition: background var(--gov-transition);
}

.gov-principle-item:hover {
    background: #E8F0F8;
}

.gov-principle-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ast-global-color-4);
    border-radius: var(--gov-border-radius);
    color: var(--ast-global-color-0);
}

.gov-principle-text {
    display: flex;
    flex-direction: column;
    gap: var(--gov-spacing-xs);
}

.gov-principle-text strong {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ast-global-color-2);
}

.gov-principle-text span {
    font-size: 0.875rem;
    color: var(--ast-global-color-3);
    line-height: 1.5;
}

/* Download Card */
.gov-download-card-wrapper {
    position: relative;
}

@media (min-width: 992px) {
    .gov-download-card-wrapper {
        position: sticky;
        top: 100px;
        align-self: start;
    }
}

.gov-download-card {
    background: var(--ast-global-color-6);
    color: var(--ast-global-color-4);
    border-radius: var(--gov-border-radius-lg);
    padding: var(--gov-spacing-lg);
}

.gov-download-badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ast-global-color-6);
    background: #FFD700;
    padding: 4px 10px;
    border-radius: 100px;
    margin-bottom: var(--gov-spacing-md);
}

.gov-download-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--ast-global-color-4);
    margin: 0 0 var(--gov-spacing-lg);
}

.gov-download-meta {
    display: flex;
    flex-direction: column;
    gap: var(--gov-spacing-sm);
    margin-bottom: var(--gov-spacing-lg);
    padding-bottom: var(--gov-spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.gov-download-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gov-download-meta-label {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
}

.gov-download-meta-value {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ast-global-color-4);
}

.gov-download-btn,
.gov-download-btn:link,
.gov-download-btn:visited {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gov-spacing-sm);
    width: 100%;
    padding: var(--gov-spacing-sm) var(--gov-spacing-md);
    background: #FFFFFF;
    color: #111111;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--gov-border-radius);
    transition: background var(--gov-transition);
}

.gov-download-btn:hover,
.gov-download-btn:active {
    background: #F0F5FA;
    color: #111111;
}

.gov-download-link {
    display: block;
    text-align: center;
    margin-top: var(--gov-spacing-md);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--gov-transition);
}

.gov-download-link:hover {
    color: var(--ast-global-color-4);
}

/* ==========================================================================
   CHAPTER INDEX
   ========================================================================== */
.gov-chapters {
    padding: var(--gov-spacing-3xl) 0;
    background: var(--ast-global-color-5);
}

.gov-chapters .gov-section-title {
    text-align: center;
    margin-bottom: var(--gov-spacing-xl);
}

.gov-chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gov-spacing-md);
}

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

.gov-chapter-card {
    display: flex;
    align-items: center;
    gap: var(--gov-spacing-md);
    padding: var(--gov-spacing-md) var(--gov-spacing-lg);
    background: var(--ast-global-color-4);
    border-radius: var(--gov-border-radius);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: box-shadow var(--gov-transition), transform var(--gov-transition);
}

.gov-chapter-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.gov-chapter-number {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ast-global-color-0);
    color: var(--ast-global-color-4);
    font-size: 0.9375rem;
    font-weight: 700;
    border-radius: 50%;
}

.gov-chapter-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ast-global-color-2);
    margin: 0;
}

/* ==========================================================================
   GOVERNANCE MODEL
   ========================================================================== */
.gov-model {
    padding: var(--gov-spacing-3xl) 0;
    background: var(--ast-global-color-4);
}

.gov-model-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--gov-spacing-xl);
}

@media (min-width: 992px) {
    .gov-model-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--gov-spacing-2xl);
        align-items: start;
    }
}

.gov-roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--gov-spacing-md);
}

@media (min-width: 768px) {
    .gov-roles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .gov-roles-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.gov-role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--gov-spacing-lg);
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius-lg);
    transition: background var(--gov-transition);
}

.gov-role-card:hover {
    background: #E8F0F8;
}

.gov-role-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ast-global-color-4);
    border-radius: 50%;
    color: var(--ast-global-color-0);
    margin-bottom: var(--gov-spacing-md);
}

.gov-role-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ast-global-color-2);
    margin: 0 0 var(--gov-spacing-xs);
}

.gov-role-entity {
    font-size: 0.8125rem;
    color: var(--ast-global-color-3);
}

/* ==========================================================================
   VERSION HISTORY
   ========================================================================== */
.gov-history {
    padding: var(--gov-spacing-3xl) 0;
    background: var(--ast-global-color-5);
}

.gov-history .gov-section-title {
    margin-bottom: var(--gov-spacing-xl);
}

.gov-history-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gov-history-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--ast-global-color-4);
    border-radius: var(--gov-border-radius);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.gov-history-table th,
.gov-history-table td {
    padding: var(--gov-spacing-md);
    text-align: left;
}

.gov-history-table th {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ast-global-color-3);
    background: var(--ast-global-color-5);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.gov-history-table td {
    font-size: 0.9375rem;
    color: var(--ast-global-color-3);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.gov-history-table tr:last-child td {
    border-bottom: none;
}

.gov-version-number {
    font-weight: 600;
    color: var(--ast-global-color-2);
}

.gov-version-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ast-global-color-4);
    background: #22C55E;
    padding: 2px 6px;
    border-radius: 100px;
    margin-left: var(--gov-spacing-xs);
    vertical-align: middle;
}

.gov-table-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ast-global-color-0);
    text-decoration: none;
    transition: color var(--gov-transition);
}

.gov-table-link:hover {
    color: var(--ast-global-color-1);
    text-decoration: underline;
}

.gov-table-disabled {
    font-size: 0.875rem;
    color: var(--ast-global-color-7);
}

/* ==========================================================================
   CTA SECTION
   ========================================================================== */
.gov-cta {
    padding: var(--gov-spacing-3xl) 0;
    background: var(--ast-global-color-6);
}

.gov-cta-content {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.gov-cta-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--ast-global-color-4);
    margin: 0 0 var(--gov-spacing-md);
}

.gov-cta-desc {
    font-size: 1.0625rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin: 0 0 var(--gov-spacing-xl);
}

.gov-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--gov-spacing-md);
}

.gov-cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gov-spacing-xs);
    padding: var(--gov-spacing-sm) var(--gov-spacing-lg);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--gov-border-radius);
    transition: all var(--gov-transition);
}

.gov-cta-btn-primary,
.gov-cta-btn-primary:link,
.gov-cta-btn-primary:visited {
    background: #FFFFFF;
    color: #111111;
}

.gov-cta-btn-primary:hover,
.gov-cta-btn-primary:active {
    background: #F0F5FA;
    color: #111111;
}

.gov-cta-btn-secondary,
.gov-cta-btn-secondary:link,
.gov-cta-btn-secondary:visited {
    background: transparent;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.gov-cta-btn-secondary:hover,
.gov-cta-btn-secondary:active {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS
   ========================================================================== */
@media (max-width: 768px) {
    .gov-hero {
        padding: var(--gov-spacing-xl) 0;
    }

    .gov-hero-meta {
        flex-direction: column;
        align-items: center;
    }

    .gov-meta-item {
        width: 100%;
        max-width: 320px;
    }

    .gov-status-content {
        flex-direction: column;
        text-align: center;
    }

    .gov-rulebook,
    .gov-chapters,
    .gov-model,
    .gov-history,
    .gov-cta {
        padding: var(--gov-spacing-xl) 0;
    }

    .gov-principle-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .gov-history-table th,
    .gov-history-table td {
        padding: var(--gov-spacing-sm);
        font-size: 0.8125rem;
    }

    .gov-cta-buttons {
        flex-direction: column;
    }

    .gov-cta-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .gov-container {
        padding: 0 var(--gov-spacing-sm);
    }

    .gov-chapter-card {
        padding: var(--gov-spacing-sm) var(--gov-spacing-md);
    }

    .gov-role-card {
        padding: var(--gov-spacing-md);
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .gov-principle-item,
    .gov-chapter-card,
    .gov-role-card,
    .gov-download-btn,
    .gov-download-link,
    .gov-table-link,
    .gov-cta-btn {
        transition: none;
    }
}

/* Focus styles */
.gov-download-btn:focus,
.gov-download-link:focus,
.gov-table-link:focus,
.gov-cta-btn:focus {
    outline: 2px solid var(--ast-global-color-0);
    outline-offset: 2px;
}

.gov-cta .gov-download-btn:focus,
.gov-cta .gov-cta-btn:focus {
    outline-color: var(--ast-global-color-4);
}

/* Skip link support */
.gov-chapter-card:focus-within,
.gov-principle-item:focus-within,
.gov-role-card:focus-within {
    outline: 2px solid var(--ast-global-color-0);
    outline-offset: 2px;
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */
@media print {
    .gov-hero {
        background: none;
        padding: 1rem 0;
    }

    .gov-status-bar {
        background: #f5f5f5;
        border: 1px solid #ccc;
    }

    .gov-download-card {
        background: #333;
        color: #fff;
    }

    .gov-cta {
        background: #333;
    }

    .gov-chapter-card,
    .gov-role-card,
    .gov-principle-item {
        break-inside: avoid;
    }
}

/* ==========================================================================
   RECURSOS PAGE STYLES
   ========================================================================== */

/* Recursos Hero - Dark background variant */
.recursos-hero {
    background: var(--ast-global-color-6);
    padding: var(--gov-spacing-3xl) 0;
}

.recursos-hero .gov-hero-title {
    color: var(--ast-global-color-4);
}

.recursos-hero .gov-hero-subtitle {
    color: rgba(255, 255, 255, 0.8);
    max-width: 700px;
}

/* Documentos Destacados Section - Grid with Thumbnails */
.recursos-docs {
    padding: var(--gov-spacing-3xl) 0;
    background: var(--ast-global-color-4);
}

.recursos-docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--gov-spacing-lg);
}

@media (min-width: 768px) {
    .recursos-docs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .recursos-docs-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.recursos-doc-card-grid {
    display: block;
    text-decoration: none;
    transition: transform var(--gov-transition);
}

.recursos-doc-card-grid:hover {
    transform: translateY(-4px);
}

.recursos-doc-thumbnail {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #F0F0F0;
    border-radius: var(--gov-border-radius-lg);
    overflow: hidden;
    margin-bottom: var(--gov-spacing-md);
}

.recursos-doc-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.recursos-doc-thumbnail-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #BDBDBD;
    background: linear-gradient(135deg, #F5F5F5 0%, #E8E8E8 100%);
}

/* Hide placeholder when image loads */
.recursos-doc-thumbnail img:not([src=""]):not([src="undefined"]) + .recursos-doc-thumbnail-placeholder {
    display: none;
}

/* Show placeholder if image fails to load */
.recursos-doc-thumbnail img[src=""],
.recursos-doc-thumbnail img:not([src]) {
    display: none;
}

.recursos-doc-thumbnail img:not([src=""]):not([src="undefined"]) {
    display: block;
}

.recursos-doc-info {
    padding: 0 4px;
}

.recursos-doc-card-grid .recursos-doc-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ast-global-color-2);
    margin: 0 0 4px;
    line-height: 1.3;
}

.recursos-doc-card-grid .recursos-doc-meta {
    font-size: 0.875rem;
    color: var(--ast-global-color-3);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.recursos-doc-card-grid:hover .recursos-doc-meta {
    color: var(--ast-global-color-0);
}

/* Legacy list styles - keep for backwards compatibility */
.recursos-docs-list {
    display: flex;
    flex-direction: column;
    gap: var(--gov-spacing-md);
}

.recursos-doc-card {
    display: flex;
    align-items: center;
    gap: var(--gov-spacing-lg);
    padding: var(--gov-spacing-lg);
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius-lg);
    transition: box-shadow var(--gov-transition);
}

.recursos-doc-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.recursos-doc-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ast-global-color-4);
    border-radius: var(--gov-border-radius);
    color: var(--ast-global-color-0);
}

.recursos-doc-content {
    flex: 1;
    min-width: 0;
}

.recursos-doc-content .recursos-doc-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ast-global-color-2);
    margin: 0 0 4px;
}

.recursos-doc-desc {
    font-size: 0.9375rem;
    color: var(--ast-global-color-3);
    margin: 0 0 6px;
}

.recursos-doc-content .recursos-doc-meta {
    font-size: 0.8125rem;
    color: var(--ast-global-color-3);
    opacity: 0.7;
}

.recursos-doc-action {
    flex-shrink: 0;
}

.recursos-download-btn,
.recursos-download-btn:link,
.recursos-download-btn:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--ast-global-color-0);
    color: #FFFFFF;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--gov-border-radius);
    transition: background var(--gov-transition);
}

.recursos-download-btn:hover,
.recursos-download-btn:active {
    background: var(--ast-global-color-1);
    color: #FFFFFF;
}

.recursos-coming-soon-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--ast-global-color-7);
    color: var(--ast-global-color-3);
    font-size: 0.8125rem;
    font-weight: 500;
    border-radius: 100px;
}

/* Categorías de Recursos Section */
.recursos-categories {
    padding: var(--gov-spacing-3xl) 0;
    background: var(--ast-global-color-5);
}

.recursos-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--gov-spacing-md);
}

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

.recursos-category-card {
    display: flex;
    flex-direction: column;
    padding: var(--gov-spacing-lg);
    background: var(--ast-global-color-4);
    border-radius: var(--gov-border-radius-lg);
    text-decoration: none;
    transition: box-shadow var(--gov-transition), transform var(--gov-transition);
}

.recursos-category-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.recursos-category-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius);
    color: var(--ast-global-color-0);
    margin-bottom: var(--gov-spacing-md);
}

.recursos-category-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ast-global-color-2);
    margin: 0 0 8px;
}

.recursos-category-desc {
    font-size: 0.9375rem;
    color: var(--ast-global-color-3);
    line-height: 1.5;
    margin: 0 0 var(--gov-spacing-md);
    flex: 1;
}

.recursos-category-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ast-global-color-0);
    margin-top: auto;
}

.recursos-category-card:hover .recursos-category-link {
    color: var(--ast-global-color-1);
}

/* Recursos CTA Section */
.recursos-cta {
    padding: var(--gov-spacing-2xl) 0;
    background: var(--ast-global-color-5);
}

.recursos-cta-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--gov-spacing-lg);
    padding: var(--gov-spacing-lg) var(--gov-spacing-xl);
    background: var(--ast-global-color-4);
    border-radius: var(--gov-border-radius-lg);
    text-align: center;
}

.recursos-cta-text {
    font-size: 1rem;
    color: var(--ast-global-color-3);
    margin: 0;
    flex: 1;
    min-width: 280px;
}

.recursos-cta-btn,
.recursos-cta-btn:link,
.recursos-cta-btn:visited {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--ast-global-color-0);
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--gov-border-radius);
    transition: background var(--gov-transition);
    flex-shrink: 0;
}

.recursos-cta-btn:hover,
.recursos-cta-btn:active {
    background: var(--ast-global-color-1);
    color: #FFFFFF;
}

/* Recursos page responsive adjustments */
@media (max-width: 768px) {
    .recursos-hero {
        padding: var(--gov-spacing-xl) 0;
    }

    .recursos-docs,
    .recursos-categories {
        padding: var(--gov-spacing-xl) 0;
    }

    .recursos-doc-card {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .recursos-doc-action {
        width: 100%;
        margin-top: var(--gov-spacing-sm);
    }

    .recursos-download-btn {
        width: 100%;
        justify-content: center;
    }

    .recursos-cta-content {
        flex-direction: column;
        text-align: center;
    }

    .recursos-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Focus styles for recursos elements */
.recursos-download-btn:focus,
.recursos-category-card:focus,
.recursos-cta-btn:focus {
    outline: 2px solid var(--ast-global-color-0);
    outline-offset: 2px;
}

/* Print styles for recursos */
@media print {
    .recursos-hero {
        background: #333;
        color: #fff;
    }

    .recursos-doc-card,
    .recursos-category-card {
        break-inside: avoid;
    }
}

/* ==========================================================================
   CASOS DE USO PAGE STYLES
   ========================================================================== */

/* Archive Page Layout */
.cdu-archive-page,
.cdu-single-page {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Hero Section */
.cdu-hero {
    background: var(--ast-global-color-6);
    padding: var(--gov-spacing-3xl) 0;
}

.cdu-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gov-spacing-xl);
    align-items: center;
}

@media (max-width: 992px) {
    .cdu-hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.cdu-hero-left {
    text-align: left;
}

@media (max-width: 992px) {
    .cdu-hero-left {
        text-align: center;
    }
}

.cdu-hero-right {
    text-align: left;
}

@media (max-width: 992px) {
    .cdu-hero-right {
        text-align: center;
    }
}

.cdu-hero .gov-eyebrow {
    color: rgba(255, 255, 255, 0.7);
}

.cdu-hero .gov-hero-title {
    color: var(--ast-global-color-4);
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: var(--gov-spacing-sm);
}

.cdu-hero .gov-hero-subtitle {
    color: var(--ast-global-color-0);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-bottom: 0;
}

.cdu-hero-intro {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0;
}

.cdu-hero-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Main Content Layout */
.cdu-content {
    padding: var(--gov-spacing-3xl) 0;
    background: var(--ast-global-color-4);
}

.cdu-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--gov-spacing-xl);
}

@media (max-width: 992px) {
    .cdu-layout {
        grid-template-columns: 1fr;
    }
}

/* Cases List */
.cdu-cases-list {
    display: flex;
    flex-direction: column;
    gap: var(--gov-spacing-lg);
}

/* Case Card */
.cdu-case-card {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: var(--gov-spacing-lg);
    padding: var(--gov-spacing-lg);
    background: #FFFFFF !important; /* Force white background to prevent conflicts */
    border-radius: var(--gov-border-radius-lg);
    transition: box-shadow var(--gov-transition);
    border: 1px solid #e5e7eb;
}

.cdu-case-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: #FFFFFF !important;
}

@media (max-width: 768px) {
    .cdu-case-card {
        grid-template-columns: 1fr;
    }

    .cdu-case-thumbnail {
        order: -1;
    }
}

/* Case Content */
.cdu-case-content {
    display: flex;
    flex-direction: column;
}

.cdu-case-header {
    margin-bottom: var(--gov-spacing-sm);
}

.cdu-case-title {
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin: 0 0 var(--gov-spacing-xs);
    line-height: 1.3;
}

.cdu-case-title a {
    color: var(--ast-global-color-2);
    text-decoration: none;
    transition: color var(--gov-transition);
}

.cdu-case-title a:hover {
    color: var(--ast-global-color-0);
}

/* Case Meta */
.cdu-case-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gov-spacing-sm);
}

.cdu-case-date {
    font-size: 0.875rem;
    color: var(--ast-global-color-3);
}

/* Vertical Badges - scoped to prevent conflicts */
.cdu-vertical-badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 20px;
    color: #FFFFFF;
    background: var(--ast-global-color-3); /* Default fallback */
}

.cdu-vertical-badge.vertical-infraestructuras {
    background: #2563eb;
}

.cdu-vertical-badge.vertical-movilidad {
    background: #059669;
}

.cdu-vertical-badge.vertical-logistica {
    background: #d97706;
}

.cdu-vertical-badge.vertical-default {
    background: var(--ast-global-color-3);
}

/* Case Excerpt */
.cdu-case-excerpt {
    flex: 1;
    margin: var(--gov-spacing-sm) 0;
}

.cdu-case-excerpt p {
    font-size: 0.9375rem;
    color: var(--ast-global-color-3);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Case Footer */
.cdu-case-footer {
    margin-top: auto;
}

.cdu-read-more {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ast-global-color-0);
    text-decoration: none;
    transition: color var(--gov-transition);
}

.cdu-read-more:hover {
    color: var(--ast-global-color-1);
    text-decoration: underline;
}

/* Case Thumbnail */
.cdu-case-thumbnail {
    flex-shrink: 0;
}

.cdu-case-image {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: var(--gov-border-radius);
}

/* Pagination */
.cdu-pagination {
    margin-top: var(--gov-spacing-xl);
    display: flex;
    justify-content: center;
}

.cdu-pagination-list {
    display: flex;
    gap: var(--gov-spacing-xs);
    list-style: none;
    margin: 0;
    padding: 0;
}

.cdu-pagination-item a,
.cdu-pagination-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ast-global-color-3);
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius);
    text-decoration: none;
    transition: all var(--gov-transition);
}

.cdu-pagination-item a:hover {
    background: var(--ast-global-color-0);
    color: #FFFFFF;
}

.cdu-pagination-item .current {
    background: var(--ast-global-color-0);
    color: #FFFFFF;
}

/* No Results */
.cdu-no-results {
    text-align: center;
    padding: var(--gov-spacing-3xl);
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius-lg);
}

.cdu-no-results p {
    font-size: 1.125rem;
    color: var(--ast-global-color-3);
    margin-bottom: var(--gov-spacing-md);
}

.cdu-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: var(--gov-spacing-xs);
    padding: 10px 20px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ast-global-color-0);
    background: transparent;
    border: 2px solid var(--ast-global-color-0);
    border-radius: var(--gov-border-radius);
    text-decoration: none;
    transition: all var(--gov-transition);
}

.cdu-btn-secondary:hover {
    background: var(--ast-global-color-0);
    color: #FFFFFF;
}

/* Sidebar */
.cdu-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.cdu-sidebar-section {
    margin-bottom: var(--gov-spacing-lg);
}

.cdu-sidebar-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--ast-global-color-2);
    margin: 0 0 var(--gov-spacing-md);
}

.cdu-sidebar-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: var(--gov-spacing-lg) 0;
}

/* Search Form */
.cdu-search-form {
    display: flex;
    gap: 0;
}

.cdu-search-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 0.9375rem;
    border: 1px solid #e5e7eb;
    border-right: none;
    border-radius: var(--gov-border-radius) 0 0 var(--gov-border-radius);
    outline: none;
    transition: border-color var(--gov-transition);
}

.cdu-search-input:focus {
    border-color: var(--ast-global-color-0);
}

.cdu-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    background: var(--ast-global-color-0);
    border: 1px solid var(--ast-global-color-0);
    border-radius: 0 var(--gov-border-radius) var(--gov-border-radius) 0;
    color: #FFFFFF;
    cursor: pointer;
    transition: background var(--gov-transition);
}

.cdu-search-btn:hover {
    background: var(--ast-global-color-1);
}

/* Filter List */
.cdu-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.cdu-filter-item {
    margin-bottom: var(--gov-spacing-xs);
}

.cdu-filter-item a {
    display: flex;
    align-items: center;
    gap: var(--gov-spacing-sm);
    padding: 8px 12px;
    font-size: 0.9375rem;
    color: var(--ast-global-color-3);
    text-decoration: none;
    border-radius: var(--gov-border-radius);
    transition: all var(--gov-transition);
}

.cdu-filter-item a:hover {
    background: var(--ast-global-color-5);
    color: var(--ast-global-color-2);
}

.cdu-filter-item.active a {
    background: var(--ast-global-color-5);
    color: var(--ast-global-color-2);
    font-weight: 600;
}

.cdu-filter-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cdu-filter-dot.vertical-infraestructuras {
    background: #2563eb;
}

.cdu-filter-dot.vertical-movilidad {
    background: #059669;
}

.cdu-filter-dot.vertical-logistica {
    background: #d97706;
}

.cdu-filter-count {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--ast-global-color-3);
    opacity: 0.7;
}

/* ==========================================================================
   SINGLE CASO DE USO STYLES
   ========================================================================== */

/* Breadcrumb */
.cdu-breadcrumb {
    background: var(--ast-global-color-5);
    padding: var(--gov-spacing-md) 0;
}

.cdu-breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gov-spacing-xs);
    list-style: none;
    margin: 0;
    padding: 0;
}

.cdu-breadcrumb-item a {
    font-size: 0.875rem;
    color: var(--ast-global-color-3);
    text-decoration: none;
    transition: color var(--gov-transition);
}

.cdu-breadcrumb-item a:hover {
    color: var(--ast-global-color-0);
}

.cdu-breadcrumb-separator {
    color: var(--ast-global-color-3);
    opacity: 0.5;
}

.cdu-breadcrumb-current span {
    font-size: 0.875rem;
    color: var(--ast-global-color-2);
    font-weight: 500;
}

/* Single Hero */
.cdu-single-hero {
    background: var(--ast-global-color-6);
    padding: var(--gov-spacing-3xl) 0;
}

.cdu-single-header {
    max-width: 800px;
}

.cdu-single-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--ast-global-color-4);
    margin: 0 0 var(--gov-spacing-md);
    line-height: 1.2;
}

.cdu-single-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gov-spacing-md);
}

.cdu-single-date {
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Featured Image */
.cdu-single-featured {
    padding: var(--gov-spacing-xl) 0 0;
    background: var(--ast-global-color-4);
}

.cdu-single-image-wrapper {
    margin: 0;
}

.cdu-single-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--gov-border-radius-lg);
}

/* Single Content */
.cdu-single-content {
    padding: var(--gov-spacing-3xl) 0;
    background: var(--ast-global-color-4);
}

.cdu-single-body {
    max-width: 800px;
    font-size: 1.0625rem;
    line-height: 1.8;
    color: var(--ast-global-color-3);
}

.cdu-single-body h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ast-global-color-2);
    margin: var(--gov-spacing-xl) 0 var(--gov-spacing-md);
}

.cdu-single-body h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--ast-global-color-2);
    margin: var(--gov-spacing-lg) 0 var(--gov-spacing-sm);
}

.cdu-single-body p {
    margin-bottom: var(--gov-spacing-md);
}

.cdu-single-body ul,
.cdu-single-body ol {
    margin-bottom: var(--gov-spacing-md);
    padding-left: var(--gov-spacing-lg);
}

.cdu-single-body li {
    margin-bottom: var(--gov-spacing-xs);
}

/* Single Navigation */
.cdu-single-nav {
    margin-top: var(--gov-spacing-3xl);
    padding-top: var(--gov-spacing-xl);
    border-top: 1px solid #e5e7eb;
}

.cdu-back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--gov-spacing-xs);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ast-global-color-0);
    text-decoration: none;
    transition: color var(--gov-transition);
}

.cdu-back-link:hover {
    color: var(--ast-global-color-1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .cdu-hero {
        padding: var(--gov-spacing-xl) 0;
    }

    .cdu-hero .gov-hero-title {
        font-size: 2rem;
    }

    .cdu-content {
        padding: var(--gov-spacing-xl) 0;
    }

    .cdu-sidebar {
        position: static;
    }

    .cdu-single-hero {
        padding: var(--gov-spacing-xl) 0;
    }

    .cdu-single-title {
        font-size: 1.75rem;
    }

    .cdu-single-content {
        padding: var(--gov-spacing-xl) 0;
    }
}

/* Focus styles for casos de uso elements */
.cdu-case-title a:focus,
.cdu-read-more:focus,
.cdu-search-input:focus,
.cdu-search-btn:focus,
.cdu-filter-item a:focus,
.cdu-back-link:focus {
    outline: 2px solid var(--ast-global-color-0);
    outline-offset: 2px;
}

/* Print styles for casos de uso */
@media print {
    .cdu-hero,
    .cdu-single-hero {
        background: #333;
        color: #fff;
    }

    .cdu-sidebar {
        display: none;
    }

    .cdu-case-card {
        break-inside: avoid;
    }
}

/* Hide Casos de Uso menu item for logged-out users */
body:not(.logged-in) .menu-item a[href*="casos-de-uso"],
body:not(.logged-in) .menu-item a[href*="casos-de-uso"]:hover {
    display: none !important;
}

body:not(.logged-in) li.menu-item:has(a[href*="casos-de-uso"]) {
    display: none !important;
}

/* Hide author info on Casos de Uso pages and posts */
.cdu-archive-page .post-author,
.cdu-archive-page .author,
.cdu-archive-page .byline,
.cdu-archive-page .entry-author,
.cdu-archive-page .autor-avatar,
.cdu-archive-page .autor-en-archivo,
.cdu-archive-page .autor-info,
.cdu-archive-page .posted-by,
.cdu-archive-page .ast-author-info,
.cdu-single-page .post-author,
.cdu-single-page .author,
.cdu-single-page .byline,
.cdu-single-page .entry-author,
.cdu-single-page .autor-avatar,
.cdu-single-page .autor-en-archivo,
.cdu-single-page .autor-info,
.cdu-single-page .posted-by,
.cdu-single-page .ast-author-info {
    display: none !important;
}

/* Hide author in Elementor post grids for caso_de_uso posts */
.type-caso_de_uso .autor-en-archivo,
.type-caso_de_uso .autor-avatar,
.type-caso_de_uso .autor-info,
.type-caso_de_uso .post-author,
.type-caso_de_uso .author,
.type-caso_de_uso .byline,
article.type-caso_de_uso .autor-en-archivo,
article.type-caso_de_uso .autor-avatar,
article.type-caso_de_uso .autor-info,
.elementor-post.type-caso_de_uso .autor-en-archivo,
.elementor-post.type-caso_de_uso .autor-avatar,
.elementor-post.type-caso_de_uso .autor-info {
    display: none !important;
}

/* ==========================================================================
   USE CASE CONTENT SECTIONS
   ========================================================================== */

/* Main container */
.nexmo-use-case-content {
    margin-top: var(--gov-spacing-3xl);
}

/* Download Button Section */
.nexmo-uc-download {
    margin-bottom: var(--gov-spacing-2xl);
}

.nexmo-uc-download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--gov-spacing-sm);
    padding: var(--gov-spacing-md) var(--gov-spacing-xl);
    background: var(--ast-global-color-0);
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--gov-border-radius);
    transition: background-color var(--gov-transition), transform var(--gov-transition);
}

.nexmo-uc-download-btn:hover {
    background: var(--ast-global-color-1);
    color: #fff;
    transform: translateY(-2px);
}

.nexmo-uc-download-btn svg {
    flex-shrink: 0;
}

/* Step Section */
.nexmo-uc-step {
    margin-bottom: var(--gov-spacing-3xl);
    padding: var(--gov-spacing-xl);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: var(--gov-border-radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.nexmo-uc-step-header {
    margin-bottom: var(--gov-spacing-xl);
    padding-bottom: var(--gov-spacing-md);
    border-bottom: 2px solid var(--ast-global-color-0);
}

.nexmo-uc-step-number {
    display: inline-block;
    padding: var(--gov-spacing-xs) var(--gov-spacing-sm);
    background: var(--ast-global-color-0);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--gov-border-radius-sm);
    margin-bottom: var(--gov-spacing-sm);
}

.nexmo-uc-step-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ast-global-color-2);
    margin: 0;
}

/* Field Grid */
.nexmo-uc-field-grid {
    display: grid;
    gap: var(--gov-spacing-xl);
}

.nexmo-uc-field-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.nexmo-uc-field-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 768px) {
    .nexmo-uc-field-grid-2,
    .nexmo-uc-field-grid-3 {
        grid-template-columns: 1fr;
    }
}

.nexmo-uc-field {
    padding: var(--gov-spacing-md);
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius);
}

.nexmo-uc-field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ast-global-color-0);
    margin: 0 0 var(--gov-spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.nexmo-uc-field-value {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--ast-global-color-3);
}

/* Badges */
.nexmo-uc-badge {
    display: inline-block;
    padding: var(--gov-spacing-xs) var(--gov-spacing-sm);
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: var(--gov-border-radius-sm);
}

.nexmo-uc-badge-category {
    background: rgba(0, 85, 140, 0.1);
    color: var(--ast-global-color-0);
}

.nexmo-uc-badge-scale {
    background: rgba(122, 178, 89, 0.1);
    color: #5b8a42;
}

/* Role Cards Grid */
.nexmo-uc-roles-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gov-spacing-lg);
    margin-top: var(--gov-spacing-xl);
}

@media (max-width: 768px) {
    .nexmo-uc-roles-grid {
        grid-template-columns: 1fr;
    }
}

.nexmo-uc-role-card {
    padding: var(--gov-spacing-lg);
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: var(--gov-border-radius);
    transition: border-color var(--gov-transition), box-shadow var(--gov-transition);
}

.nexmo-uc-role-card:hover {
    border-color: var(--ast-global-color-0);
    box-shadow: 0 4px 12px rgba(0, 85, 140, 0.1);
}

.nexmo-uc-role-consumidor {
    border-left: 4px solid #7ab259;
}

.nexmo-uc-role-consumidor .nexmo-uc-role-name {
    color: #5b8a42;
}

.nexmo-uc-role-proveedor {
    border-left: 4px solid #00558c;
}

.nexmo-uc-role-proveedor .nexmo-uc-role-name {
    color: #00558c;
}

.nexmo-uc-role-autorizada {
    border-left: 4px solid #9b59b6;
}

.nexmo-uc-role-autorizada .nexmo-uc-role-name {
    color: #8e44ad;
}

.nexmo-uc-role-habilitadora {
    border-left: 4px solid #f39c12;
}

.nexmo-uc-role-habilitadora .nexmo-uc-role-name {
    color: #d68910;
}

.nexmo-uc-role-title {
    display: flex;
    align-items: center;
    gap: var(--gov-spacing-sm);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ast-global-color-2);
    margin: 0 0 var(--gov-spacing-md);
    padding-bottom: var(--gov-spacing-sm);
    border-bottom: 1px solid #e5e7eb;
}

.nexmo-uc-role-name {
    flex: 1;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--ast-global-color-2);
}

.nexmo-uc-role-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--ast-global-color-5);
    border-radius: 50%;
    color: var(--ast-global-color-0);
}

.nexmo-uc-role-content {
    display: flex;
    flex-direction: column;
    gap: var(--gov-spacing-sm);
}

.nexmo-uc-role-field {
    display: flex;
    flex-direction: column;
    gap: var(--gov-spacing-xs);
}

.nexmo-uc-role-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ast-global-color-0);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.nexmo-uc-role-value {
    font-size: 0.9375rem;
    color: var(--ast-global-color-3);
}

/* Step 3: Evaluation - Charts */
.nexmo-uc-value-risk {
    display: flex;
    align-items: center;
    gap: var(--gov-spacing-md);
    margin-bottom: var(--gov-spacing-xl);
    padding: var(--gov-spacing-md);
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius);
}

.nexmo-uc-value-risk-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ast-global-color-2);
}

.nexmo-uc-value-risk-badge {
    padding: var(--gov-spacing-xs) var(--gov-spacing-md);
    font-size: 0.8125rem;
    font-weight: 700;
    border-radius: var(--gov-border-radius-sm);
}

.nexmo-uc-value-risk-badge.yes {
    background: #dcfce7;
    color: #166534;
}

.nexmo-uc-value-risk-badge.no {
    background: #fef2f2;
    color: #991b1b;
}

/* Charts Section with Legend */
.nexmo-uc-charts-section {
    margin-bottom: var(--gov-spacing-xl);
}

.nexmo-uc-charts-legend {
    padding: var(--gov-spacing-lg);
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--gov-border-radius);
    margin-bottom: var(--gov-spacing-xl);
}

.nexmo-uc-charts-legend-title {
    font-size: 1rem;
    font-weight: 700;
    color: #00558c !important;
    margin: 0 0 var(--gov-spacing-md);
}

.nexmo-uc-charts-legend-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--gov-spacing-sm);
}

.nexmo-uc-legend-item {
    display: flex;
    align-items: flex-start;
    gap: var(--gov-spacing-sm);
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--ast-global-color-3);
}

.nexmo-uc-legend-marker {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    border-radius: 3px;
    margin-top: 2px;
}

.nexmo-uc-legend-revenues .nexmo-uc-legend-marker {
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
}

.nexmo-uc-legend-costs .nexmo-uc-legend-marker {
    background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
}

.nexmo-uc-legend-strategy .nexmo-uc-legend-marker {
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 100%);
}

.nexmo-uc-legend-text strong {
    color: var(--ast-global-color-2);
}

@media (max-width: 768px) {
    .nexmo-uc-charts-legend {
        padding: var(--gov-spacing-md);
    }

    .nexmo-uc-legend-item {
        font-size: 0.8125rem;
    }
}

.nexmo-uc-charts-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--gov-spacing-2xl);
}

@media (max-width: 768px) {
    .nexmo-uc-charts-wrapper {
        grid-template-columns: 1fr;
    }
}

.nexmo-uc-chart-container {
    padding: var(--gov-spacing-lg);
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius);
    text-align: center;
}

.nexmo-uc-chart-title {
    font-size: 1rem;
    font-weight: 700;
    color: #00558c !important;
    margin: 0 0 var(--gov-spacing-md);
    text-align: center;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .nexmo-uc-chart-title {
        font-size: 0.9375rem;
    }
}

.nexmo-uc-chart-container canvas {
    max-width: 100%;
    height: auto;
}

/* Totals Grid */
.nexmo-uc-totals-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gov-spacing-lg);
    margin-bottom: var(--gov-spacing-xl);
}

@media (max-width: 768px) {
    .nexmo-uc-totals-grid {
        grid-template-columns: 1fr;
    }
}

.nexmo-uc-total-card {
    padding: var(--gov-spacing-lg);
    text-align: center;
    border-radius: var(--gov-border-radius);
    border: 2px solid #e5e7eb;
}

.nexmo-uc-total-proveedor {
    background: rgba(0, 85, 140, 0.05);
    border-color: rgba(0, 85, 140, 0.2);
}

.nexmo-uc-total-consumidor {
    background: rgba(122, 178, 89, 0.05);
    border-color: rgba(122, 178, 89, 0.2);
}

.nexmo-uc-total-habilitadora {
    background: rgba(243, 156, 18, 0.05);
    border-color: rgba(243, 156, 18, 0.2);
}

.nexmo-uc-total-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ast-global-color-0);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--gov-spacing-xs);
}

.nexmo-uc-total-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ast-global-color-2);
}

/* Social Impact */
.nexmo-uc-social-impact {
    padding: var(--gov-spacing-lg);
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius);
}

.nexmo-uc-social-impact-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin: 0 0 var(--gov-spacing-md);
    padding-bottom: var(--gov-spacing-sm);
    border-bottom: 2px solid #00558c;
}

.nexmo-uc-social-impact-content {
    display: flex;
    flex-direction: column;
    gap: var(--gov-spacing-md);
}

.nexmo-uc-impact-badge {
    display: inline-block;
    padding: var(--gov-spacing-xs) var(--gov-spacing-md);
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--gov-border-radius-sm);
}

.nexmo-uc-impact-badge.impact-high {
    background: #dcfce7;
    color: #166534;
}

.nexmo-uc-impact-badge.impact-medium {
    background: #fef3c7;
    color: #92400e;
}

.nexmo-uc-impact-badge.impact-low {
    background: #f3f4f6;
    color: #6b7280;
}

.nexmo-uc-impact-description {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--ast-global-color-3);
    margin: 0;
}

/* Step 4: Complexity Bars */
.nexmo-uc-complexity-bars {
    display: flex;
    flex-direction: column;
    gap: var(--gov-spacing-lg);
    margin-bottom: var(--gov-spacing-xl);
}

.nexmo-uc-complexity-row {
    display: grid;
    grid-template-columns: 180px 1fr 120px;
    gap: var(--gov-spacing-md);
    align-items: center;
}

@media (max-width: 768px) {
    .nexmo-uc-complexity-row {
        grid-template-columns: 1fr;
        gap: var(--gov-spacing-xs);
    }
}

.nexmo-uc-complexity-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--ast-global-color-2);
}

.nexmo-uc-complexity-bar {
    position: relative;
    height: 12px;
}

.nexmo-uc-complexity-track {
    display: flex;
    gap: 4px;
    height: 100%;
}

.nexmo-uc-complexity-segment {
    flex: 1;
    background: #e5e7eb;
    border-radius: 2px;
    transition: background-color var(--gov-transition);
}

.nexmo-uc-complexity-segment.active {
    background: var(--ast-global-color-0);
}

.nexmo-uc-complexity-indicator {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.nexmo-uc-complexity-dot {
    display: block;
    width: 16px;
    height: 16px;
    background: var(--ast-global-color-0);
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.nexmo-uc-complexity-value {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--ast-global-color-3);
    text-align: right;
}

@media (max-width: 768px) {
    .nexmo-uc-complexity-value {
        text-align: left;
    }
}

/* Global Complexity */
.nexmo-uc-global-complexity {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gov-spacing-md);
    padding: var(--gov-spacing-lg);
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius);
}

.nexmo-uc-global-complexity-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--ast-global-color-2);
}

.nexmo-uc-global-complexity-badge {
    padding: var(--gov-spacing-sm) var(--gov-spacing-lg);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--gov-border-radius);
}

.nexmo-uc-global-complexity-badge.complexity-low {
    background: #dcfce7;
    color: #166534;
}

.nexmo-uc-global-complexity-badge.complexity-medium {
    background: #fef3c7;
    color: #92400e;
}

.nexmo-uc-global-complexity-badge.complexity-medium-high {
    background: #ffedd5;
    color: #c2410c;
}

.nexmo-uc-global-complexity-badge.complexity-high {
    background: #fef2f2;
    color: #991b1b;
}

/* Step 5: Realization */
.nexmo-uc-status-wrapper {
    display: flex;
    align-items: center;
    gap: var(--gov-spacing-md);
    margin-bottom: var(--gov-spacing-lg);
}

.nexmo-uc-status-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ast-global-color-2);
}

.nexmo-uc-status-badge {
    padding: var(--gov-spacing-xs) var(--gov-spacing-md);
    font-size: 0.875rem;
    font-weight: 700;
    border-radius: var(--gov-border-radius-sm);
}

.nexmo-uc-status-badge.status-pending {
    background: #f3f4f6;
    color: #6b7280;
}

.nexmo-uc-status-badge.status-progress {
    background: #dbeafe;
    color: #1e40af;
}

.nexmo-uc-status-badge.status-completed {
    background: #dcfce7;
    color: #166534;
}

.nexmo-uc-realization-description {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--ast-global-color-3);
    padding: var(--gov-spacing-md);
    background: var(--ast-global-color-5);
    border-radius: var(--gov-border-radius);
}

/* Print styles for use case content */
@media print {
    .nexmo-uc-download {
        display: none;
    }

    .nexmo-uc-step {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }

    .nexmo-uc-charts-wrapper {
        page-break-inside: avoid;
    }
}

/* Accessibility: Focus styles */
.nexmo-uc-download-btn:focus {
    outline: 2px solid var(--ast-global-color-0);
    outline-offset: 2px;
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    .nexmo-uc-download-btn,
    .nexmo-uc-role-card,
    .nexmo-uc-complexity-segment {
        transition: none;
    }
}

/* ==========================================================================
   USE CASE SUBMISSION CTA
   ========================================================================== */

.ucs-cta-section {
    background: linear-gradient(135deg, #2D1B5E 0%, #7B5EA7 100%);
    padding: var(--gov-spacing-md) 0;
}

.ucs-cta-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--gov-spacing-md);
}

.ucs-cta-content {
    flex: 1;
    min-width: 200px;
}

.ucs-cta-text {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
}

.ucs-cta-btn,
.ucs-cta-btn:link,
.ucs-cta-btn:visited {
    display: inline-flex;
    align-items: center;
    gap: var(--gov-spacing-xs);
    padding: var(--gov-spacing-sm) var(--gov-spacing-lg);
    background: #FFFFFF;
    color: #2D1B5E;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--gov-border-radius);
    transition: all var(--gov-transition);
    flex-shrink: 0;
}

.ucs-cta-btn:hover,
.ucs-cta-btn:active {
    background: #F4F0F9;
    color: #2D1B5E;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ucs-cta-btn:focus {
    outline: 2px solid #FFFFFF;
    outline-offset: 2px;
}

.ucs-cta-btn svg {
    flex-shrink: 0;
}

.ucs-cta-action {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.375rem;
}

.ucs-cta-subtitle {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

@media (max-width: 768px) {
    .ucs-cta-bar {
        flex-direction: column;
        text-align: center;
    }

    .ucs-cta-action {
        align-items: center;
        width: 100%;
    }

    .ucs-cta-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Rulebook Request Modal Styles
   ========================================================================== */

/* Modal Overlay */
.rb-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rb-modal.rb-modal-open {
    opacity: 1;
    visibility: visible;
}

.rb-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Modal Content */
.rb-modal-content {
    position: relative;
    background: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.rb-modal.rb-modal-open .rb-modal-content {
    transform: translateY(0);
}

/* Close Button */
.rb-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #6B7280;
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
}

.rb-modal-close:hover {
    background: #F3F4F6;
    color: #1F2937;
}

/* Modal Header */
.rb-modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.rb-modal-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border-radius: 16px;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.rb-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1F2937;
    margin: 0 0 0.5rem 0;
}

.rb-modal-subtitle {
    font-size: 0.938rem;
    color: #6B7280;
    margin: 0;
}

/* Form Styles */
.rb-modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.rb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.rb-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.rb-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}

.rb-required {
    color: #EF4444;
}

.rb-input {
    padding: 0.75rem 1rem;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 1rem;
    color: #1F2937;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.rb-input:focus {
    outline: none;
    border-color: #6366F1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Checkbox */
.rb-checkbox-group {
    margin-top: 0.5rem;
}

.rb-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.rb-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #6366F1;
    cursor: pointer;
}

.rb-checkbox-text {
    font-size: 0.875rem;
    color: #4B5563;
    line-height: 1.5;
}

.rb-checkbox-text a {
    color: #6366F1;
    text-decoration: underline;
}

.rb-checkbox-text a:hover {
    color: #4F46E5;
}

/* Form Message */
.rb-form-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.rb-message-success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.rb-message-error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* Form Actions */
.rb-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.rb-btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.rb-btn:active {
    transform: scale(0.98);
}

.rb-btn-secondary {
    background: #F3F4F6;
    border: 1px solid #D1D5DB;
    color: #374151;
}

.rb-btn-secondary:hover {
    background: #E5E7EB;
}

.rb-btn-primary {
    background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    border: none;
    color: #FFFFFF;
}

.rb-btn-primary:hover {
    background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
}

.rb-btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.rb-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.rb-spinner {
    animation: rb-spin 1s linear infinite;
}

@keyframes rb-spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Button styles for table links */
button.gov-table-link {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--ast-global-color-0, #0274be);
    text-decoration: none;
    transition: color var(--gov-transition);
}

button.gov-table-link:hover {
    color: var(--ast-global-color-1, #3a3a3a);
}

/* Responsive */
@media (max-width: 480px) {
    .rb-modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .rb-form-row {
        grid-template-columns: 1fr;
    }

    .rb-form-actions {
        flex-direction: column-reverse;
    }

    .rb-btn {
        width: 100%;
    }
}
