/* --- ESTILOS DE MARCA TicODS --- */
:root {
    --primary: #004aad;
    --primary-dark: #002a60;
    --accent: #009B77;
    --text: #1F2937;
    --bg: #F3F4F6;
    --white: #FFFFFF;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* CABECERA */
header {
    background: var(--white);
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    height: 40px;
    width: auto;
}

/* PORTADA (HERO) */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 5rem 20px 8rem 20px;
    /* Más padding abajo para la caja de búsqueda */
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero .subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
    margin-bottom: 2.5rem;
}

/* --- NUEVO: BARRA DE BÚSQUEDA --- */
.search-box-container {
    max-width: 700px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px;
    border-radius: 60px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.search-box {
    display: flex;
    background: white;
    border-radius: 50px;
    padding: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-input {
    flex-grow: 1;
    border: none;
    padding: 15px 25px;
    font-size: 1.1rem;
    border-radius: 50px 0 0 50px;
    outline: none;
    font-family: 'Inter', sans-serif;
}

.search-btn {
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 10px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-btn:hover {
    background-color: #007a5e;
    transform: translateY(-1px);
}

/* CONTENEDOR PRINCIPAL */
.container {
    max-width: 1100px;
    margin: -4rem auto 4rem auto;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

/* TARJETAS */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* RESULTADO DEL ANÁLISIS */
#resultado-auditoria {
    display: none;
    /* Oculto al inicio */
    animation: fadeIn 0.5s ease;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.audit-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: center;
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
    border-radius: 12px;
    background: white;
}

.audit-info h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text);
    font-size: 1.5rem;
}

.audit-info a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.audit-meta {
    display: flex;
    gap: 2rem;
    font-size: 1rem;
    color: #6B7280;
    margin-top: 1rem;
}

.audit-meta span {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.audit-meta i {
    font-size: 1.2rem;
    margin-right: 6px;
}

.audit-score {
    text-align: center;
}

.score-badge {
    display: inline-block;
    padding: 0.8rem 1.2rem;
    border-radius: 12px;
    font-weight: 800;
    font-size: 2.5rem;
    color: white;
    min-width: 4rem;
    line-height: 1;
}

.score-label {
    display: block;
    font-size: 0.85rem;
    color: #6B7280;
    margin-top: 8px;
    text-transform: uppercase;
    font-weight: 600;
}

/* Scores Colors */
.bg-green {
    background-color: #10B981;
}

.bg-yellow {
    background-color: #F59E0B;
}

.bg-red {
    background-color: #EF4444;
}

/* LOADING */
.loader-overlay {
    display: none;
    text-align: center;
    padding: 2rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 74, 173, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

footer {
    text-align: center;
    padding: 3rem 0;
    margin-top: 4rem;
    color: #6B7280;
    border-top: 1px solid #e5e7eb;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .audit-item {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .audit-meta {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .audit-score {
        margin-top: 1rem;
    }
}
