/* SENCICO Premium Redesign */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --primary-red: #c00000; /* Deep SENCICO red */
    --primary-dark: #a00000;
    --text-color: #333333;
    --text-muted: #666666;
    --light-bg: #f8f9fa;
    --border-color: #e5e5e5;
    --card-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

body {
    font-family: 'Inter', sans-serif !important;
    background-color: #fbfbfb !important;
    padding-top: 0 !important; /* Override Site.css 50px */
    padding-bottom: 0 !important; /* Override Site.css 20px */
    color: var(--text-color);
}

    .main-content,
    body[data-layout="horizontal"] .main-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

    .page-content,
    body[data-layout="horizontal"] .page-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }

#layout-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Navbar */
.navbar-custom {
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    margin-bottom: 0 !important;
}

    .navbar-custom .nav-link {
        color: #555 !important;
        font-weight: 600;
        font-size: 0.88rem;
        padding: 8px 16px !important;
        margin: 0 4px;
        border-radius: 30px;
        transition: all 0.25s ease;
        display: flex;
        align-items: center;
        gap: 6px;
        text-decoration: none;
    }

        .navbar-custom .nav-link:hover {
            color: var(--primary-red) !important;
            background-color: rgba(204, 0, 0, 0.04);
        }

        .navbar-custom .nav-link.active {
            color: var(--primary-red) !important;
            background-color: rgba(204, 0, 0, 0.08);
            font-weight: 700;
        }

        .navbar-custom .nav-link i {
            font-size: 1.15rem;
            color: #666;
            transition: all 0.25s ease;
        }

        .navbar-custom .nav-link:hover i,
        .navbar-custom .nav-link.active i {
            color: var(--primary-red);
        }

    .navbar-custom .btn-account {
        border: 1px solid var(--border-color);
        border-radius: 20px;
        padding: 8px 20px;
        color: var(--text-color);
        background: white;
        display: flex;
        align-items: center;
        gap: 8px;
        font-weight: 600;
        font-size: 0.9rem;
        text-decoration: none;
        transition: all 0.2s;
    }

        .navbar-custom .btn-account:hover {
            border-color: #ccc;
            background: #f8f9fa;
        }

/* Hero Section */
.hero-section {
    background-image: radial-gradient(rgba(255, 255, 255, 0.08) 2px, transparent 2.5px), linear-gradient(to right, rgba(160, 0, 0, 1) 0%, rgba(140, 0, 0, 0.5) 30%, rgba(140, 0, 0, 0) 60%), url('../Content/assets/images/red-buildings.png');
    background-size: 30% 100%, 100% 100%, auto 100%;
    background-repeat: repeat-y, no-repeat, repeat-x;
    background-position: right top, center, left center;
    background-color: #800000;
    color: white;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
    min-height: 680px;
    display: flex;
    align-items: center;
}

.hero-center-shield {
    position: absolute;
    right: 44%;
    top: 48%;
    transform: translateY(-50%);
    z-index: 1;
    pointer-events: none;
}

    .hero-center-shield svg {
        width: 180px;
        height: 180px;
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.15));
    }

.hero-tag {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 25px;
    font-weight: 600;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 1.05rem;
    opacity: 0.9;
    margin-bottom: 40px;
    line-height: 1.5;
    max-width: 90%;
}

.hero-features {
    display: flex;
    gap: 30px;
    margin-top: 25px;
}

.hero-feature-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
}

.feature-icon-box {
    width: 45px;
    height: 45px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

/* Search Card */
.search-card {
    background: white;
    border-radius: 8px;
    padding: 25px 30px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    color: var(--text-color);
}

    .search-card h4 {
        font-size: 1rem;
        font-weight: 700;
        margin-bottom: 20px;
    }

.search-input-group {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px; /* Tighter margin */
}

    .search-input-group .input-icon-box {
        background: #a00000;
        color: white;
        padding: 12px 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-right: none;
    }

    .search-input-group .form-control {
        border: none;
        padding: 15px;
        font-size: 1rem;
        box-shadow: none !important;
    }

        .search-input-group .form-control:focus {
            outline: none;
        }

.btn-search-primary {
    background: linear-gradient(to right, #a00000, #c00000);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 14px;
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(160, 0, 0, 0.25);
}

    .btn-search-primary:hover {
        background: linear-gradient(to right, #800000, #a00000);
        color: white;
    }

.search-footer {
    text-align: center;
    font-size: 0.85rem;
    color: #888;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

/* Official Badge (Used in popup and page) */
.official-badge {
    background: #eaf5ea;
    color: #0b5c3b;
    padding: 12px 20px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    border: 1px solid #cce5cc;
    flex-shrink: 0;
}

    .official-badge i {
        font-size: 1.4rem;
    }

/* Info Section on Page */
.info-section {
    background: white;
    border-radius: 12px;
    padding: 25px 35px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    margin-bottom: 40px;
}

/* Popup specific styling */
.popup-info-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    background: transparent;
}

.popup-icon-container {
    flex-shrink: 0;
}

.popup-info-icon {
    width: 70px;
    height: 70px;
    background: #0b5c3b;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 4px 15px rgba(11, 92, 59, 0.2);
}

.popup-text {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

.popup-badge-container {
    flex-shrink: 0;
}

/* Premium Options Section */
.option-card-premium {
    background: white;
    border-radius: 8px;
    padding: 22px 18px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    height: 100%;
    transition: all 0.3s ease;
}

    .option-card-premium:hover {
        border-color: #ffd0d0;
        box-shadow: 0 8px 25px rgba(192, 0, 0, 0.05);
        transform: translateY(-2px);
    }

.option-icon-premium {
    width: 55px;
    height: 55px;
    background: #fdf1f1;
    color: #c00000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}

/* Premium Stats Banner */
.stats-premium-banner {
    background: #fdf5f5;
    border-radius: 12px;
}

.stat-item-premium {
    border-right: 1px solid #f2dada;
}

    .stat-item-premium.no-border {
        border-right: none;
    }

.stat-icon-premium {
    width: 38px;
    height: 38px;
    background: transparent;
    border: 2px solid #cc0000;
    color: #cc0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .stat-item-premium {
        border-right: none;
        margin-bottom: 20px;
    }
}

/* Footer */
.footer-custom {
    background-color: #fbfbfb;
    border-top: 1px solid var(--border-color);
    padding-top: 50px;
    font-size: 0.9rem;
}

.footer-logo {
    max-width: 180px;
    margin-bottom: 15px;
}

.footer-social {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

    .footer-social a {
        color: white;
        background: #222;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.2s;
        font-size: 0.85rem;
    }

        .footer-social a:hover {
            background: var(--primary-red);
        }

.footer-title {
    font-weight: 800;
    margin-bottom: 20px;
    font-size: 0.9rem;
    text-transform: uppercase;
    color: #333;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
}

    .footer-links li {
        margin-bottom: 10px;
    }

    .footer-links a {
        color: #555;
        text-decoration: none;
        transition: color 0.2s;
        font-weight: 500;
        font-size: 0.85rem;
    }

        .footer-links a:hover {
            color: var(--primary-red);
        }

.footer-contact li {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    color: #555;
    font-weight: 500;
    font-size: 0.85rem;
}

.footer-contact i {
    color: var(--primary-red);
    font-size: 1.1rem;
}

.footer-bottom {
    background-color: var(--primary-red);
    color: white;
    padding: 12px 0;
    margin-top: 30px;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
}

.footer-bottom-logos {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Utilities */
.btn-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.2s;
}

    .btn-whatsapp:hover {
        transform: scale(1.05);
        color: white;
    }

@media (max-width: 991px) {
    .popup-info-layout {
        flex-direction: column;
        text-align: center;
    }

    .hero-features {
        flex-direction: column;
        gap: 15px;
    }

    .official-badge {
        width: 100%;
        justify-content: center;
    }

    .stat-item {
        margin-bottom: 25px;
    }

    .footer-bottom-flex {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Premium Mobile Tweaks */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.3rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-section {
        padding: 40px 0;
        margin-top: 0;
    }

    .hero-center-shield {
        display: none;
    }

    .search-card {
        margin-top: 25px;
        padding: 25px 20px;
    }

    .option-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 20px;
    }

    .option-icon {
        margin-bottom: 10px;
    }

    .stat-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .stat-content {
        text-align: center !important;
        margin-top: 10px;
    }

    .footer-custom {
        text-align: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-contact li {
        justify-content: center;
    }

    .footer-logo {
        margin: 0 auto 15px auto;
        display: block;
    }
}

/* Resultados Dashboard Styles */
.dashboard-header {
    background: white;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

.stat-card-premium {
    background: white;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.02);
    height: 100%;
}

.stat-icon-red {
    width: 50px;
    height: 50px;
    background: #fdf1f1;
    color: #c00000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
}

.bg-light-danger {
    background-color: #fdf1f1;
}

.badge-soft-danger {
    background-color: #fdf1f1;
    color: #c00000;
    border: 1px solid #f5c2c2;
}

.certificate-list-item:hover .bg-white {
    background-color: #fafafa !important;
    transform: translateX(2px);
    transition: all 0.2s ease;
}

/* Table Header Styling */
.table-sencico-header th {
    background-color: #d32f2f !important;
    color: white !important;
}

/* Print Only blocks */
.print-only-block {
    display: none !important;
}

/* Print Media Styles */
@media print {
    @page {
        margin: 0 !important;
    }

    /* Forzar la impresión de colores de fondo y gráficos */
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Ocultar elementos de control de página y widgets */
    .navbar-toggler,
    #navbarNav,
    .btn-whatsapp,
    .btn-ver-detalle,
    .dataTables_filter,
    .dataTables_length,
    .dataTables_paginate,
    .dataTables_info,
    #dvEstadisticas,
    .no-print,
    footer,
    .footer-custom,
    .footer-bottom,
    #dvListaCertificadosContenedor,
    #dvDetalleGrilla,
    .navbar-custom,
    .profile-header-card {
        display: none !important;
    }

    .print-only-block {
        display: block !important;
    }

    body {
        background-color: white !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    #mainWrapperResultados {
        background-color: white !important;
        padding: 15mm 15mm 15mm 15mm !important;
        margin: 0 !important;
    }

    .container {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Mantener el diseño del perfil en una línea (horizontal) */
    .profile-header-card {
        box-shadow: none !important;
        border: 1px solid #eee !important;
        margin-bottom: 20px !important;
        background-color: white !important;
        border-radius: 12px !important;
    }

    .profile-header-card .card-body {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 15px 20px !important;
    }

    .profile-header-card .card-body > div:first-child {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        gap: 15px !important;
        text-align: left !important;
    }

    .profile-header-card .d-none.d-md-block {
        display: block !important;
        width: 1px !important;
        height: 18px !important;
        background-color: #ccc !important;
    }

    /* Tablas con diseño idéntico al de pantalla (Cabeceras rojas) */
    table {
        width: 100% !important;
        border-collapse: collapse !important;
        margin-top: 15px !important;
    }

    th, td {
        padding: 12px 10px !important;
        border: 1px solid #ddd !important;
        text-align: center !important;
    }

    .table-sencico-header th {
        background-color: #ffffff !important;
        color: #000000 !important;
        font-weight: bold !important;
        text-transform: uppercase !important;
        font-size: 0.82rem !important;
        border: 1px solid #ddd !important;
    }

    td {
        font-size: 0.82rem !important;
        color: #444 !important;
    }

    tr {
        page-break-inside: avoid !important;
        page-break-after: auto !important;
    }
}
