/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #ffc107;
    --secondary-color: #343a40;
    --accent-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #fd7e14;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Prompt', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== NAVIGATION ===== */
.custom-navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ffeb99 100%);
    border-bottom: 3px solid var(--secondary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 600;
    color: var(--dark-color) !important;
    transition: var(--transition);
}

.navbar-brand:hover {
    transform: translateY(-2px);
    color: var(--secondary-color) !important;
}

.logo-img {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

.logo-img:hover {
    transform: scale(1.1) rotate(5deg);
}

.brand-text {
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

/* ===== HEADER SECTION ===== */
.header-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    animation: float 20s infinite linear;
}

@keyframes float {
    0% { transform: translateY(0px) rotate(0deg); }
    100% { transform: translateY(-100px) rotate(360deg); }
}

.ita-logo {
    animation: bounceIn 1s ease-out;
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

.main-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: slideInDown 1s ease-out 0.3s both;
}

.subtitle {
    font-size: 1.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: #e8f4fd;
    animation: slideInDown 1s ease-out 0.6s both;
}

.description {
    font-size: 1.3rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: #d1ecf1;
    animation: slideInDown 1s ease-out 0.9s both;
}

@keyframes slideInDown {
    0% { opacity: 0; transform: translateY(-30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.assessment-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 1rem auto;
    max-width: 600px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 1s ease-out 1.2s both;
}

@keyframes fadeInUp {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

.qr-code img {
    max-height: 180px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.qr-code img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 1rem 0;
    max-width: 1400px;
}

.intro-section {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 3rem;
    box-shadow: var(--box-shadow);
    position: relative;
    overflow: hidden;
}

.intro-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.section-title {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    position: relative;
    padding-left: 1rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: var(--accent-color);
    border-radius: 2px;
}

.intro-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
    margin-bottom: 2rem;
}

/* ===== INDICATORS OVERVIEW ===== */
.indicators-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.indicator-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
    position: relative;
}

.indicator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.indicator-card h4 {
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.sub-indicators {
    list-style: none;
    padding: 0;
}

.sub-indicators li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: #666;
    transition: var(--transition);
}

.sub-indicators li::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-size: 0.8rem;
}

.sub-indicators li:hover {
    color: var(--accent-color);
    padding-left: 2rem;
}

/* ===== DATA SECTION ===== */
.data-section {
    background: white;
    border-radius: var(--border-radius);
    margin-bottom: 3rem;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.data-section:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.section-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #495057 100%);
    color: white;
    padding: 1.5rem;
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.sub-section-header {
    background: linear-gradient(135deg, var(--success-color) 0%, #20c997 100%);
    color: white;
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

/* ===== TABLE SECTION ===== */
.table-section {
    padding: 0;
}

.table-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ffeb99 100%);
    padding: 1rem 1.5rem;
    margin: 0;
    border-bottom: 2px solid #dee2e6;
}

.table-header h5 {
    margin: 0;
    color: var(--dark-color);
    font-weight: 600;
    display: flex;
    align-items: center;
}

.table-header i {
    color: var(--accent-color);
}

/* ===== CUSTOM TABLE ===== */
.custom-table {
    margin: 0;
    background: white;
    border-collapse: separate;
    border-spacing: 0;
}

.custom-table thead th {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%);
    color: white;
    font-weight: 600;
    padding: 1rem;
    text-align: center;
    border: none;
    position: relative;
}

.custom-table thead th:first-child {
    border-top-left-radius: 0;
}

.custom-table thead th:last-child {
    border-top-right-radius: 0;
}

.custom-table tbody tr {
    transition: var(--transition);
    border-bottom: 1px solid #dee2e6;
}

.custom-table tbody tr:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.custom-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border: none;
    position: relative;
}

.col-id {
    width: 8%;
    font-weight: 600;
    color: var(--accent-color);
    font-size: 1.1rem;
}

.col-title {
    width: 20%;
    font-weight: 500;
    color: var(--secondary-color);
}

.col-detail {
    width: 52%;
}

.col-action {
    width: 20%;
}

.detail-content {
    line-height: 1.7;
    color: #555;
}

/* ===== BUTTONS ===== */
.btn-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ffeb99 100%);
    border: none;
    color: var(--dark-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    margin: 0.2rem;
}

.btn-custom:hover {
    background: linear-gradient(135deg, #e0a800 0%, #ffcc02 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    color: var(--dark-color);
}

.btn-custom:active {
    transform: translateY(0);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

/* ===== FOOTER ===== */
.custom-footer {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #495057 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
    position: relative;
}

.custom-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: var(--transition);
    margin: 0 0.2rem;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large screens */
@media (min-width: 1200px) {
    .main-title {
        font-size: 3rem;
    }
    
    .subtitle {
        font-size: 2rem;
    }
    
    .container {
        max-width: 1200px;
    }
}

/* Medium screens */
@media (max-width: 992px) {
    .indicators-overview {
        grid-template-columns: 1fr;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .subtitle {
        font-size: 1.5rem;
    }
    
    .description {
        font-size: 1.1rem;
    }
    
    .custom-table {
        font-size: 0.9rem;
    }
    
    .col-id {
        width: 10%;
    }
    
    .col-title {
        width: 25%;
    }
    
    .col-detail {
        width: 45%;
    }
    
    .col-action {
        width: 20%;
    }
}

/* Small screens */
@media (max-width: 768px) {
    .header-section {
        padding: 2rem 0;
    }
    
    .main-title {
        font-size: 1.8rem;
    }
    
    .subtitle {
        font-size: 1.3rem;
    }
    
    .description {
        font-size: 1rem;
    }
    
    .assessment-info {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .main-content {
        padding: 2rem 0;
    }
    
    .intro-section,
    .data-section {
        margin: 0 1rem 2rem 1rem;
        padding: 1.5rem;
    }
    
    .indicators-overview {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1rem;
    }
    
    .indicator-card {
        padding: 1rem;
    }
    
    .table-responsive {
        border-radius: var(--border-radius);
        box-shadow: var(--box-shadow);
    }
    
    .custom-table {
        font-size: 0.8rem;
    }
    
    .custom-table thead th,
    .custom-table tbody td {
        padding: 0.7rem 0.5rem;
    }
    
    .btn-custom {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
        min-width: 100px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .brand-text {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-header {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .sub-section-header {
        font-size: 1rem;
        padding: 0.8rem 1rem;
    }
}

/* Extra small screens */
@media (max-width: 576px) {
    .main-title {
        font-size: 1.5rem;
    }
    
    .subtitle {
        font-size: 1.1rem;
    }
    
    .description {
        font-size: 0.9rem;
    }
    
    .custom-table {
        font-size: 0.75rem;
    }
    
    .custom-table thead th,
    .custom-table tbody td {
        padding: 0.5rem 0.3rem;
    }
    
    .col-id {
        width: 15%;
    }
    
    .col-title {
        width: 85%;
    }
    
    .col-detail,
    .col-action {
        width: 100%;
        display: block;
        padding-top: 0.5rem;
    }
    
    .btn-custom {
        width: 100%;
        margin: 0.1rem 0;
    }
    
    .intro-section,
    .data-section {
        margin: 0 0.5rem 1rem 0.5rem;
        padding: 1rem;
    }
    
    .assessment-info {
        padding: 1rem;
        margin: 0.5rem;
    }
    
    .qr-code img {
        max-height: 150px;
    }
    
    .brand-text {
        display: none;
    }
}

/* ===== ANIMATIONS & UTILITIES ===== */
.fade-in {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

/* ===== SCROLL BEHAVIOR ===== */
html {
    scroll-behavior: smooth;
}

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    color: transparent;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus states for better accessibility */
.btn-custom:focus,
.custom-table tbody tr:focus,
a:focus {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .header-section,
    .custom-navbar,
    .custom-footer,
    .btn-custom {
        display: none;
    }
    
    .main-content {
        padding: 0;
    }
    
    .custom-table {
        font-size: 12px;
    }
    
    .data-section {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}