/* Font faces */
@font-face {
    font-family: 'DM Sans';
    src: url('assets/fonts/DMSans-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Montserrat';
    src: url('assets/fonts/Montserrat-Variable.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'DM Sans', sans-serif; /* DM Sans para todo */
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #141415;
    color: #eee9e1;
    line-height: 1.6;
    font-size: 14px;
}

p {
    line-height: 1.5rem; /* leading-6 */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 0 1rem;
}

/* Header */
.header {
    padding: 4rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 0 2rem;
}

.header-logos {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-title-section {
    text-align: center;
    padding: 2rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: nowrap;
    width: 100%;
}

.header-main-title {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #f9f9f9;
    font-size: 3rem;
    font-weight: 500;
    text-transform: capitalize;
    line-height: 50.40px;
    margin: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.header-main-title-desktop {
    order: 2;
}

.header-main-title-mobile {
    order: 2;
}

.header-line-decoration {
    flex: 1 1 auto;
    max-width: 400px;
    min-width: 150px;
    height: auto;
    object-fit: contain;
}

.header-line-decoration:first-of-type {
    order: 1;
}

.header-line-decoration:last-of-type {
    order: 3;
}

/* Desktop version - visible on desktop, hidden on mobile */
.header-main-title-desktop {
    display: block;
}

.header-main-title-mobile {
    display: none;
}

/* Mobile version - visible on mobile, hidden on desktop */
@media (max-width: 768px) {
    .header-main-title-desktop {
        display: none;
    }

    .header-main-title-mobile {
        display: block;
    }
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.creed-logo-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.creed-logo-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.creed-text-logo {
    height: 2.5rem;
    width: auto;
}

.subtitle {
    font-size: 1.2rem;
    color: #888;
    font-weight: 400;
}

.header-partner {
    display: flex;
    align-items: center;
}

.partner-link {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    text-decoration: none;
}

.partner-link:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

.turtle-header-logo {
    height: 1.5rem;
    width: auto;
    opacity: 0.85;
}

/* Methodology section with turtle logo */
.methodology-content {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.methodology-text {
    flex: 1;
}

.methodology-partner {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
}

.turtle-link {
    display: inline-block;
    transition: transform 0.3s ease;
    text-decoration: none;
}

.turtle-link:hover {
    transform: scale(1.05);
}

.turtle-logo-large {
    height: 180px; /* 3x bigger than original 60px */
    width: auto;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.turtle-logo-large:hover {
    opacity: 1;
}

/* Bottom sections grid layout */
.bottom-sections-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    align-items: flex-start;
}

.partners-section-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.partners-section-right h4 {
    color: #eee9e1;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Function-specific pastel colors */
.function-govern {
    color: #e4a169 !important; /* Pastel yellow */
    border-color: #e4a169 !important;
}

.function-identify {
    color: #db737f !important; /* Pastel pink */
    border-color: #db737f !important;
}

.function-protect {
    color: #73f36c !important; /* Pastel green */
    border-color: #73f36c !important;
}

.function-detect {
    color: #b94d5a !important; /* Pastel red */
    border-color: #b94d5a !important;
}

.function-respond {
    color: #8fb3d3 !important; /* Pastel blue */
    border-color: #8fb3d3 !important;
}

.function-recover {
    color: #dda0dd !important; /* Pastel purple */
    border-color: #dda0dd !important;
}

/* Control ID styling with function colors - same as function-name-cell */
/* This is the base definition, overridden by .control-item .control-id */

/* Tab button colors - all use same color scheme */
.tab-button.active {
    color: #73f36c; /* text-[#73f36c] */
    background: rgba(249, 249, 249, 0.1); /* bg-[#f9f9f9]/10 */
}

.tab-button:not(.active) {
    color: rgba(255, 255, 255, 0.5); /* text-white/50 */
}

/* Dynamic field styling */
.add-field-btn {
    background: transparent;
    border: 1px dashed #444;
    color: #888;
    padding: 0.5rem 1rem;
    border-radius: 9999px; /* rounded-full */
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
    font-family: 'DM Sans', sans-serif;
}

.add-field-btn:hover {
    border-color: #73f36c;
    color: #73f36c;
    background: rgba(0, 255, 136, 0.05);
}

.dynamic-field-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.dynamic-field-group input {
    flex: 1;
    min-width: 0; /* Prevent input from overflowing */
}

.dynamic-social-field {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #333;
}

.social-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.social-name-input {
    flex: 0 0 35%; /* Fixed width for social name */
    min-width: 120px;
}

.social-url-input {
    flex: 1; /* Flexible width for URL */
}

.remove-field-btn {
    background: transparent;
    border: 1px solid #666;
    color: #666;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.2s ease;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-field-btn:hover {
    border-color: #ff4757;
    color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Buttons */
.btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #73f36c 0%, #73f36c 100%);
    color: #000;
}

.btn-secondary {
    background: #2a2a2a;
    color: #eff8ed;
    border: 1px solid #444;
}

.btn-secondary:hover {
    background: #3a3a3a;
    border-color: #555;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* Primary Tab Navigation */
.tab-navigation {
    background: #1a1a1a;

    padding: 1rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.primary-tabs {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.primary-tab-button {
    color: #f9f9f9;
    padding: 0.625rem 1.25rem;
    height: 2.5rem;
    background-color: rgba(249, 249, 249, 0.05);
    border-radius: 100px;
    border: none;
    font-size: 1rem;
    font-weight: 500; /* font-medium */
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.primary-tab-button:hover {
    background-color: rgba(249, 249, 249, 0.1);
    color: #f9f9f9;
}

.primary-tab-button[data-primary="assessment"] {
    color: #f9f9f9; /* text-[#f9f9f9] */
    font-size: 1rem;
    font-weight: 500; /* font-medium */
}

.primary-tab-button[data-primary="about"] {
    color: #f9f9f9;
    font-size: 1rem;
    font-weight: 500; /* font-medium */
    padding: 0.625rem 1.25rem; /* py-2.5 px-5 */
    background-color: rgba(249, 249, 249, 0.05); /* bg-[#f9f9f9]/5 */
}

.primary-tab-button.active {
    /* background-color: rgba(249, 249, 249, 0.15); */
    font-weight: 500;
    border: 1px solid #73f36c;
    border-bottom: none;
    color: #73f36c;
    box-shadow: 0px 2px 4px rgba(115, 243, 108, 0.3);
}

.primary-tab-button[data-primary="assessment"].active {
    color: #73f36c;
}

.primary-tab-button[data-primary="about"].active {
    color: #73f36c;
}

.primary-tab-button[data-primary="about"]::before {
    color: inherit;
    font-weight: 500;
}

/* Secondary Tab Navigation */
.navigation-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.625rem;
    margin-bottom: 2rem;
}

.navigation-container.hidden {
    display: none;
}

.secondary-navigation {
    background: rgba(249, 249, 249, 0); /* bg-[#f9f9f9]/0 */    
    height: 38px;
    border-radius: 100px; /* rounded-[100px] */
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25); /* shadow-[0px_0px_4px_0px_rgba(0,0,0,0.25)] */
    border: 1px solid rgba(249, 249, 249, 0.1); /* border border-[#f9f9f9]/10 */
    display: flex;
    justify-content: flex-start; /* justify-start */
    align-items: center; /* items-center */
    gap: 0.625rem; /* gap-2.5 */
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.secondary-navigation::-webkit-scrollbar {
    display: none;
}


.secondary-tabs {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
    gap: 0.625rem; /* gap-2.5 */
    height: 100%; /* fill height of parent */
    align-items: center;
}

.secondary-tabs::-webkit-scrollbar {
    display: none;
}

.assessment-actions {
    display: flex;
    gap: 0.625rem; /* gap-2.5 */
    align-items: center;
    flex-shrink: 0;
    justify-content: flex-end;
}

/* Import/Export JSON buttons - same style as tab buttons */
.assessment-actions .btn-secondary.btn-small {
    background: rgba(249, 249, 249, 0.1); /* bg-[#f9f9f9]/10 */
    border: none;
    color: rgba(255, 255, 255, 0.5); /* text-white/50 */
    padding: 0.625rem 1rem;
    height: 38px;
    font-size: 0.75rem; /* text-xs */
    font-weight: 500; /* font-medium */
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 9999px; /* rounded-full */
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.assessment-actions .btn-secondary.btn-small:hover {
    color: rgba(255, 255, 255, 0.7);
}

.assessment-actions .btn-secondary.btn-small.active {
    color: #73f36c; /* text-[#73f36c] */
    background: rgba(249, 249, 249, 0.1); /* bg-[#f9f9f9]/10 */
}

/* Export PDF button - same style as other buttons but with green background and black text */
.assessment-actions .btn-primary.btn-small {
    background: #73f36c; /* green background */
    border: none;
    color: #000; /* black text */
    padding: 0.625rem 1rem;
    height: 38px;
    font-size: 0.75rem; /* text-xs */
    font-weight: 500; /* font-medium */
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 9999px; /* rounded-full */
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.assessment-actions .btn-primary.btn-small:hover {
    color: #000;
    background: #5cd053; /* slightly darker green on hover */
}

.tab-button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5); /* text-white/50 */
    padding: 0 1rem;
    height: 100%; /* fill height of parent */
    font-size: 0.75rem; /* text-xs */
    font-weight: 500; /* font-medium */
    font-family: 'DM Sans', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 9999px; /* rounded-full */
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.tab-button:hover {
    color: rgba(255, 255, 255, 0.7);
}

.tab-button.active {
    color: #73f36c; /* text-[#73f36c] */
    background: rgba(249, 249, 249, 0.1); /* bg-[#f9f9f9]/10 */
}

/* Main Content */

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

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

.section h2 {
    font-size: 1.8rem;
    color: #eff8ed;
    margin-bottom: 1rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
}

.description {
    color: #ffffff50;
    font-size: 18px;
    margin-bottom: 3rem;
    line-height: 1.75rem;
    font-family: 'DM Sans', sans-serif;
}

/* Summary Table */
.summary-table-container {
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 8px;
    border: none;
    outline: none;
}

.summary-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px; /* 10px gap between rows */
}

.summary-table tbody tr {
    display: table-row;
}

.summary-table tbody td {
    vertical-align: middle;
}

.summary-table tbody td:first-child {
    border-top-left-radius: 100px;
    border-bottom-left-radius: 100px;
}

.summary-table tbody td:last-child {
    border-top-right-radius: 100px !important;
    border-bottom-right-radius: 100px !important;
}

.summary-table thead {
    background: none;
}

.summary-table thead tr {
    background: none;
}

.summary-table th,
.summary-table td {
    padding: 1rem;
    text-align: center; /* contenido centrado */
    vertical-align: middle; /* alineación vertical centrada */
    border: none;
    border-bottom: none;
    outline: none;
}

.summary-table td.function-name-cell {
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-table th {
    background: none; /* sin bg */
    color: #bfbfbf; /* text-[#bfbfbf] */
    font-weight: 400; /* font-normal */
    font-size: 0.75rem; /* text-[8px] */
    text-transform: none;
    letter-spacing: normal;
    font-family: 'DM Sans', sans-serif;
    border: none; /* sin bordes */
    outline: none;
}

.summary-table td {
    color: #f9f9f9; /* text color */
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
}

.summary-table tbody tr {
    background: transparent; /* transparente para que se vea el fondo de las celdas */
}

.summary-table tbody tr.function-row td {
    background: rgba(249, 249, 249, 0.02); /* fondo de la fila */
}

.summary-table tbody tr.function-row td:first-child {
    border-top-left-radius: 100px;
    border-bottom-left-radius: 100px;
}

.summary-table tbody tr.function-row td:last-child {
    border-top-right-radius: 100px;
    border-bottom-right-radius: 100px;
}

/* Function name cells with colors */
.function-name-cell {
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    color: #f9f9f9; /* text color */
    background: rgba(255, 255, 255, 0.05); /* fondo */
    border: 1px solid rgba(249, 249, 249, 0.1); /* subtle border */
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    height: 100%;
}

/* Function indicator - same structure as tier-indicator */
.function-indicator {
    width: 0.75rem; /* w-3 */
    height: 0.75rem; /* h-3 */
    position: relative;
    flex-shrink: 0;
    display: inline-block;
}

.function-indicator::before {
    content: '';
    width: 0.5rem; /* w-2 */
    height: 0.5rem; /* h-2 */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    border-radius: 50%;
}

.function-indicator::after {
    content: '';
    width: 0.75rem; /* w-3 */
    height: 0.75rem; /* h-3 */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    border-radius: 50%;
    border: 1px solid transparent;
}

/* Function-specific colors */
.function-name-cell.govern .function-indicator::before {
    background: #e4a169; /* orange solid circle */
}

.function-name-cell.govern .function-indicator::after {
    border-color: #e4a169; /* orange border */
}

.function-name-cell.identify .function-indicator::before {
    background: #db737f; /* red solid circle */
}

.function-name-cell.identify .function-indicator::after {
    border-color: #db737f; /* red border */
}

.function-name-cell.protect .function-indicator::before {
    background: #73f36c; /* bright green solid circle */
}

.function-name-cell.protect .function-indicator::after {
    border-color: #73f36c; /* green border */
}

.function-name-cell.detect .function-indicator::before {
    background: #b94d5a; /* red solid circle */
}

.function-name-cell.detect .function-indicator::after {
    border-color: #b94d5a; /* red border */
}

.function-name-cell.respond .function-indicator::before {
    background: #8fb3d3; /* medium blue solid circle */
}

.function-name-cell.respond .function-indicator::after {
    border-color: #8fb3d3; /* blue border */
}

.function-name-cell.recover .function-indicator::before {
    background: #dda0dd; /* purple solid circle */
}

.function-name-cell.recover .function-indicator::after {
    border-color: #dda0dd; /* purple border */
}

/* Remove old styles */
.function-name-cell.govern,
.function-name-cell.identify,
.function-name-cell.protect,
.function-name-cell.detect,
.function-name-cell.respond,
.function-name-cell.recover {
    border-left: none;
}

/* Form Elements */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

/* Ensure all form inputs have consistent width */
.form-group input,
.form-group select,
.form-group textarea,
.dynamic-field-group input,
.social-input-group input {
    width: 100%;
    box-sizing: border-box;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: #bfbfbf; /* text-[#bfbfbf] */
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    margin-bottom: 0.5rem;
    margin-left: 12px; /* margen izquierdo */
    text-transform: none;
    letter-spacing: normal;
    font-family: 'DM Sans', sans-serif;
}

.form-group input {
    background: rgba(255, 255, 255, 0.05); /* bg rgb 0.5 */
    border: none; /* sin borde */
    outline: none; /* sin outline */
    color: #eff8ed;
    padding: 0.75rem 1.5rem; /* px-6 */
    border-radius: 20px; /* rounded-[20px] */
    font-size: 0.9rem;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
}

.form-group select,
.form-group textarea {
    background: #2a2a2a;
    border: 1px solid rgba(249, 249, 249, 0.1); /* border */
    color: #eff8ed;
    padding: 0.75rem;
    border-radius: 20px; /* rounded-[20px] */
    font-size: 0.9rem;
    transition: all 0.2s ease;
    font-family: 'DM Sans', sans-serif;
}

.form-group input:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #73f36c;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

.form-group input::placeholder {
    color: #666;
}

/* Resources Section */
.resources-section {
    margin-top: 3rem;
    padding-top: 2rem;
}

.resources-section h3 {
    color: #eff8ed; /* text-[#eff8ed] */
    font-size: 1.5rem; /* text-2xl */
    font-weight: 500; /* font-medium */
    margin-bottom: 1.5rem;
    font-family: 'DM Sans', sans-serif;
}

.resources-section h4 {
    color: #eff8ed;
    margin-bottom: 1.5rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
}

.resources-section h4 {
    margin-top: 2rem;
    font-size: 1.2rem;
}

/* Controls Container */
.controls-container {
    margin-top: 2rem;
}

.control-item {
    background: none; /* sin bg */
    border: 1px solid rgba(249, 249, 249, 0.1); /* border */
    border-radius: 20px; /* rounded-[20px] */
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    position: relative;
}

.control-item:hover {
    border-color: rgba(249, 249, 249, 0.2);
}

.control-main {
    display: flex;
    align-items: stretch; /* para que ambos lados tengan la misma altura */
    gap: 1.5rem;
    height: 100%;
}

.control-left {
    flex: 1; /* mitad del espacio */
    min-width: 0;
}

.control-right {
    flex: 1; /* mitad del espacio */
    min-width: 0;
}

.control-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.control-item .control-id {
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    color: #f9f9f9; /* text color */
    background: rgba(255, 255, 255, 0.02); /* fondo */
    border-right: none;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    position: relative;
    height: 100%;
    padding: 0.5rem 1rem;
    border-radius: 100px; /* rounded container */
    min-width: 85px;
    text-align: center;
}

/* Function indicator colors for control-id */
.control-item .control-id.govern .function-indicator::before {
    background: #e4a169; /* orange solid circle */
}

.control-item .control-id.govern .function-indicator::after {
    border-color: #e4a169; /* orange border */
}

.control-item .control-id.identify .function-indicator::before {
    background: #db737f; /* red solid circle */
}

.control-item .control-id.identify .function-indicator::after {
    border-color: #db737f; /* red border */
}

.control-item .control-id.protect .function-indicator::before {
    background: #73f36c; /* bright green solid circle */
}

.control-item .control-id.protect .function-indicator::after {
    border-color: #73f36c; /* green border */
}

.control-item .control-id.detect .function-indicator::before {
    background: #b94d5a; /* red solid circle */
}

.control-item .control-id.detect .function-indicator::after {
    border-color: #b94d5a; /* red border */
}

.control-item .control-id.respond .function-indicator::before {
    background: #8fb3d3; /* medium blue solid circle */
}

.control-item .control-id.respond .function-indicator::after {
    border-color: #8fb3d3; /* blue border */
}

.control-item .control-id.recover .function-indicator::before {
    background: #dda0dd; /* purple solid circle */
}

.control-item .control-id.recover .function-indicator::after {
    border-color: #dda0dd; /* purple border */
}

.control-status {
    flex: 1;
    padding-right: 0.5rem; /* padding derecho para la flecha del select */
}

.control-status select {
    width: 100%; /* llenar todo el espacio disponible */
    outline: none; /* sin outline */
    border: none; /* sin borde */
    background: rgba(255, 255, 255, 0.02); /* bg rgb 0.5 */
    color: #f9f9f9;
    padding: 0.6rem 1.5rem 0.6rem 0.6rem; /* padding derecho para la flecha */
    border-radius: 9999px; /* rounded-full */
    font-size: 0.85rem;
    cursor: pointer;
}

.control-status select:focus {
    outline: none;
    border-color: #73f36c;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

.control-requirement {
    color: #f9f9f9;
    font-weight: 500;
    line-height: 1.6;
    margin-bottom: 0;
}

.control-explanation {
    margin-top: 0;
    height: 100%; /* full height para que el textarea pueda ocupar todo */
    display: flex;
    flex-direction: column;
    position: relative; /* para posicionar el icono de manera absoluta */
}

.control-explanation textarea {
    width: 100%;
    height: 100%; /* full height */
    min-height: 70px;
    resize: vertical;
    background: rgba(255, 255, 255, 0.02); /* bg rgb 0.5 */
    border: none; /* sin borde */
    color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 20px; /* rounded-full */
    font-size: 0.85rem;
    font-family: inherit;
    line-height: 1.4;
}

.control-explanation::after {
    content: '';
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2rem; /* más grande */
    height: 2rem; /* más grande */
    background-image: url('assets/pen.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    pointer-events: none; /* para que no interfiera con el textarea */
    z-index: 1;
}

.control-explanation textarea:focus {
    outline: none;
    border-color: #73f36c;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.2);
}

.control-explanation textarea::placeholder {
    color: #f9f9f9; /* color f9f9f9 */
    font-style: normal; /* sin itálico */
}

/* Save indicator */
.save-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #73f36c;
    color: #000;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.save-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

.save-indicator.saving {
    background: #ffa500;
    color: #000;
}

.save-indicator.saved {
    background: #73f36c;
    color: #000;
}

/* CTA Section */
.cta-section {
    margin: 3rem 2rem;
    padding: 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-content h2 {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #f9f9f9;
    font-size: 3rem;
    font-weight: 500;
    text-transform: capitalize;
    line-height: 50.40px;
    margin-bottom: 1rem;
}

.cta-content > p {
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    margin-left: auto;
    margin-right: auto;
}

.feature {
    padding: 2.5rem; /* p-10 */
    border: 1px solid rgba(249, 249, 249, 0.1);
    border-radius: 20px;
    text-align: left;
}

.feature-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 0.5rem;
}

.feature-icon {
    width: 2rem; /* w-8 (doble de w-4) */
    height: 2rem; /* h-8 (doble de h-4) */
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(115, 243, 108, 0.8)); /* shadow verde */
}

.feature h4 {
    color: #eff8ed; /* text-[#eff8ed] */
    margin: 0;
    font-size: 1.25rem; /* text-xl */
    font-weight: 500; /* font-medium */
    text-align: left;
}

.feature p {
    color: rgba(255, 255, 255, 0.5); /* text-white/50 */
    font-size: 1.125rem; /* text-lg */
    font-weight: 400; /* font-normal */
    text-align: left;
}

.cta-content .btn {
    width: 535px; /* w-[535px] */
    max-width: 100%;
    padding: 0.5rem 2.5rem; /* py-2 px-10 */
    background: rgba(249, 249, 249, 0.1); /* bg-[#f9f9f9]/10 */
    border-radius: 100px; /* rounded-[100px] */
    color: #73f36c; /* text-[#73f36c] */
    font-size: 1rem;
    font-weight: 500; /* font-medium */
    font-family: 'DM Sans', sans-serif; /* font-['DM_Sans'] */
    border: none;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Turtle decorations in CTA section */
.turtle-decoration {
    position: absolute;
    z-index: 0;

    pointer-events: none;
}

.turtle-1 {
    left: 0;
    bottom: 20%;
}

.turtle-2 {
    top: 0;
    left: 10%;
}

.turtle-3 {
    right: 0;
    top: 20%;
}

/* Ensure content is above turtles */
.cta-content {
    position: relative;
    z-index: 1;
}

/* Schedule a Consultation buttons - same width */
.btn-primary-consultation,
.cta-section .btn-primary.btn-large {
    width: 535px;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem !important;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.btn-primary-consultation:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Footer */
.footer {
    padding: 2rem;
    text-align: center;
    color: #666;
    font-size: 0.85rem;
    position: relative;
}

.footer-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-icon-link {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
}

.footer-icon-link:hover {
    color: #73f36c;
}

.footer-icon-link svg {
    width: 20px;
    height: 20px;
}

.clear-cache-btn {
    background: transparent;
    font-family: 'DM Sans', sans-serif;
    border: 1px solid #444;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.clear-cache-btn:hover {
    border-color: #666;
    color: #999;
    background: rgba(255, 255, 255, 0.02);
}

.clear-cache-btn:active {
    transform: translateY(-50%) scale(0.98);
}

/* Responsive */
@media (max-width: 768px) {
    p {
        font-size: 1rem; /* text-base */
    }

    .header {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .header-logos {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .primary-tabs {
        width: 100%;
        justify-content: space-between;
    }

    .header-title-section {
        padding: 1rem 0;
    }

    .header-line-decoration {
        display: none;
    }

    .header-main-title {
        font-size: 1.875rem; /* text-3xl */
        line-height: 2.5rem; /* leading-10 */
        margin-bottom: 0;
    }

    .main-content {
        padding: 25px;
    }

    .tab-navigation {
        padding: 0 1rem;
    }

    .primary-tab-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        flex: 1;
    }

    .secondary-navigation {
        padding: 0 0.5rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .secondary-tabs {
        justify-content: flex-start;
        width: 100%;
        order: 1;
    }

    .assessment-actions {
        width: 100%;
        order: 2;
        justify-content: flex-end;
        padding-top: 0.5rem;
    }

    .tab-button {
        padding: 0.8rem 1rem;
        font-size: 0.8rem;
    }

    .btn-small {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
    }

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

    .control-main {
        flex-direction: column;
        gap: 1rem;
    }

    .control-right {
        max-width: none;
        height: 100%;
        width: 100%;
    }

    .control-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .control-status {
        width: 100%;
    }

    .control-status select {
        max-width: none;
    }

    .footer-links {
        flex-direction: row;
        gap: 1rem;
    }

    .cta-section {
        margin: 0;
        padding: 2rem;
    }

    .turtle-decoration {
        display: none;
    }

    .cta-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .summary-table th,
    .summary-table td {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .creed-text-logo {
        height: 2rem;
    }

    .subtitle {
        font-size: 0.9rem;
    }

    .turtle-header-logo {
        height: 1.5rem; /* h-6 */
    }
}

@media (max-width: 480px) {
    .creed-text-logo {
        height: 1.75rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .turtle-header-logo {
        height: 1.5rem; /* h-6 */
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .section h2 {
        font-size: 1.5rem;
    }

    .summary-table-container {
        font-size: 0.75rem;
    }
}

/* Loading and transition effects */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

/* Status color coding */
.status-implemented {
    color: #73f36c;
}

.status-not-implemented {
    color: #ff4757;
}

.status-not-applicable {
    color: #888;
}

/* Bullet icon styling */
.bullet-icon {
    position: absolute;
    left: 0;
    width: 1.5rem;
    height: 1.5rem;
    filter: drop-shadow(0 0 4px rgba(115, 243, 108, 0.6)) drop-shadow(0 0 8px rgba(115, 243, 108, 0.4));
}

/* About Tab Styling */
.about-content {
    margin: 0 auto;
    padding: 0;
}

.about-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
}

.about-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.about-section h3 {
    color: #eff8ed;
    font-size: 1.5rem;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.5rem;
    margin-bottom: 16px;
    text-align: left;
}

.light {
    color: #ffffff50;
}

.usage-benefits-title,
.usage-benefits h4 {
    color: #eff8ed !important;
    font-size: 1.5rem !important;
    font-weight: 500 !important;
    font-family: 'DM Sans', sans-serif !important;
    line-height: 1.5rem !important;
    margin-bottom: 1rem !important;
}

.usage-benefit-item {
    padding: 0.5rem 0;
    padding-left: 1.75rem;
    position: relative;
    font-size: 1.125rem;
    font-weight: 400;
    font-family: 'DM Sans', sans-serif;
    line-height: 1.25rem;
}

.about-section h4 {
    color: #eff8ed;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    text-align: left;
}

.about-section .description {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.125rem;
    font-weight: 400;
    text-align: left;
    margin-bottom: 1rem;
    line-height: 1.75rem;
}

.highlight {
    color: #73f36c;
}

/* Functions Grid */
.functions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
    width: 100%;
}

.function-card {
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    position: relative;
}

.function-card:hover {
    border-color: #73f36c;
    background: #1e1e1e;
    transform: translateY(-2px);
}

.function-card h4 {
    margin-bottom: 0.75rem;
    font-size: 20px;
    font-weight: 400;
}

.function-badge-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.function-card p {
    color: #f9f9f9;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.control-count {
    padding: 0.5rem 0.75rem;
    background-color: rgba(249, 249, 249, 0.1);
    border-radius: 0.75rem;
    font-size: 12px;
    font-weight: 500;
}

/* Function card title colors */
.function-card-title.govern {
    color: #F7931A;
}

.function-card-title.identify {
    color: #FF0608;
}

.function-card-title.protect {
    color: #73F36C;
}

.function-card-title.detect {
    color: #EFFF86CC;
}

.function-card-title.respond {
    color: #627EEA;
}

.function-card-title.recover {
    color: #AAF1D5;
}

/* Control count colors */
.control-count.govern {
    color: #F7931A;
}

.control-count.identify {
    color: #FF0608;
}

.control-count.protect {
    color: #73F36C;
}

.control-count.detect {
    color: #EFFF86CC;
}

.control-count.respond {
    color: #627EEA;
}

.control-count.recover {
    color: #AAF1D5;
}

/* Process Steps */
.process-steps {
    margin: 0 auto;
    margin-top: 3rem;
}

.step {
    display: flex;
    flex-direction: column;
    margin: 0 auto -1rem auto;
    padding: 1.5rem;
    background-color: #141514;
    max-width: 700px;
    border-radius: 20px;
    box-shadow: 0px -4px 40px 0px rgba(0,0,0,0.60);
    border: 1px solid rgba(249, 249, 249, 0.1);
}

.step-header {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.step-number {
    background: rgba(249, 249, 249, 0.1);
    border: 1px solid rgba(249, 249, 249, 0.1);
    color: #73f36c;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.step-header h4 {
    margin: 0;
    color: #eff8ed;
    font-size: 20px;
}

.step p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.125rem;
    line-height: 1.6;
    margin: 0;
}

/* Tiers Grid */
.tiers-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
    width: 100%;
    padding: 1.25rem; /* p-5 */
    background: #141514; /* bg-[#141514] */
    border-radius: 20px; /* rounded-[20px] */
    box-shadow: 0px 4px 40px 0px rgba(0, 0, 0, 0.80); /* shadow-[0px_4px_40px_0px_rgba(0,0,0,0.80)] */
    border: 1px solid rgba(249, 249, 249, 0.1); /* border-[#f9f9f9]/10 */
}

.tier-card {
    background: #1a1a1a;
    border: 1px solid rgba(249, 249, 249, 0.1);
    border-radius: 10px;
    padding: 1.75rem;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.3);
}

.tier-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: 10px 10px 0 0;
}

.tier-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.tier-indicator {
    width: 0.75rem; /* w-3 */
    height: 0.75rem; /* h-3 */
    position: relative;
    flex-shrink: 0;
}

.tier-indicator::before {
    content: '';
    width: 0.5rem; /* w-2 */
    height: 0.5rem; /* h-2 */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: transparent;
    border-radius: 50%;
}

.tier-indicator::after {
    content: '';
    width: 0.75rem; /* w-3 */
    height: 0.75rem; /* h-3 */
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 0.6;
    border-radius: 50%;
    border: 1px solid transparent;
}

.tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.125rem 0.625rem; /* py-0.5 px-2.5 */
    background: rgba(249, 249, 249, 0.1);
    border-radius: 122.5px;
    color: #f9f9f9;
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    position: relative;
}

.tier-card.tier-0 .tier-badge { color: #f9f9f9; }
.tier-card.tier-1 .tier-badge { color: #FF0608; }
.tier-card.tier-2 .tier-badge { color: #F7931A; }
.tier-card.tier-3 .tier-badge { color: #EFFF86CC; }
.tier-card.tier-4 .tier-badge { color: #627EEA; }
.tier-card.tier-5 .tier-badge { color: #73F36C; }

.tier-card.tier-0 .tier-indicator::before { background: #f9f9f9; }
.tier-card.tier-0 .tier-indicator::after { border-color: #f9f9f9; }
.tier-card.tier-1 .tier-indicator::before { background: #FF0608; }
.tier-card.tier-1 .tier-indicator::after { border-color: #FF0608; }
.tier-card.tier-2 .tier-indicator::before { background: #F7931A; }
.tier-card.tier-2 .tier-indicator::after { border-color: #F7931A; }
.tier-card.tier-3 .tier-indicator::before { background: #EFFF86CC; }
.tier-card.tier-3 .tier-indicator::after { border-color: #EFFF86CC; }
.tier-card.tier-4 .tier-indicator::before { background: #627EEA; }
.tier-card.tier-4 .tier-indicator::after { border-color: #627EEA; }
.tier-card.tier-5 .tier-indicator::before { background: #73F36C; }
.tier-card.tier-5 .tier-indicator::after { border-color: #73F36C; }

.tier-title {
    color: #f9f9f9;
    font-size: 1.25rem; /* text-xl */
    font-weight: 400; /* font-normal */
}

.tier-card:hover {
    background: #1e1e1e;
    transform: translateY(-2px);
}

.tier-card h4 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.tier-card p {
    color: #f9f9f9;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
}

/* Links Section */
.links-section {
    margin: 2rem 0;
}

.external-links {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.external-link {
    background: linear-gradient(135deg, #73f36c 0%, #73f36c 100%);
    color: #000;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.external-link:hover {
    background: linear-gradient(135deg, #73f36c 0%, #5cd053 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.external-link::after {
    content: '→';
    font-weight: 700;
}

/* About Creed Hero Section */
.about-creed-hero {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.about-creed-hero h3 {
    color: #eff8ed;
    font-size: 1.5rem; /* text-2xl */
    margin-bottom: 1rem;
}

.about-creed-hero p {
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Open Source Note */
.open-source-note {
    background: #1a1a1a;
    padding: 1.5rem;
    margin: 2.5rem 0;
    border-radius: 20px;
}

.open-source-note h4 {
    color: #73f36c;
    margin-bottom: 0.75rem;
}

.open-source-note p {
    color: #ccc;
    line-height: 1.6;
}

/* Responsive adjustments for About tab */
@media (max-width: 768px) {
    .about-content {
        max-width: 100%;
        padding: 0;
    }

    .functions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .tiers-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .step {
        flex-direction: column;
        text-align: left;
        gap: 1rem;
    }

    .step-number {
        align-self: flex-start;
    }

    .external-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .external-link {
        justify-content: center;
        text-align: center;
    }

    .about-section h3 {
        font-size: 1.5rem; /* text-2xl */
    }

    .about-section h4 {
        font-size: 1rem;
    }

    /* Responsive adjustments for turtle logo */
    .methodology-content {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .turtle-logo-large {
        height: 120px; /* Smaller on mobile but still 2x original */
    }

    /* Responsive grid layout */
    .bottom-sections-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

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