:root {
    --primary-color: #1a237e;
    --secondary-color: #00acc1;
    --accent-color: #ff9800;
    --success-color: #4caf50;
    --warning-color: #ff5722;
    --light-color: #f5f5f5;
    --dark-color: #212121;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    --gradient-secondary: linear-gradient(135deg, #00acc1 0%, #26c6da 100%);
    --gradient-success: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    --gradient-warning: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
    --gradient-danger: linear-gradient(135deg, #f44336 0%, #ef5350 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    color: var(--dark-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Updated: Full width container without padding */
.full-width-container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Regular container with padding for inner content */
.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 15px;
}

/* Header Styles - Mobile First */
/* Updated: Full width header - Made more compact */
.header-section {
    background: var(--gradient-primary);
    border-radius: 0;
    padding: 15px 0; /* Reduced from 20px 0 */
    margin-bottom: 15px; /* Reduced from 20px */
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.header-section .container {
    padding: 15px 15px; /* Reduced from 20px 15px */
}

.header-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.header-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 50%;
}

.gov-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px; /* Reduced from 20px */
    gap: 15px; /* Reduced from 20px */
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Updated: Governor photo comes first on mobile */
.governor-item {
    order: 1;
    margin-bottom: 15px; /* Reduced from 20px */
}

.governor-honor {
    text-align: center;
    color: white;
    width: 100%;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    order: 2;
}

.governor-honor h1 {
    font-size: 1.4rem; /* Reduced from 1.6rem */
    margin-bottom: 8px; /* Reduced from 12px */
    background: linear-gradient(45deg, #fff, #e0f7fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.3; /* Reduced from 1.4 */
}

.governor-honor p {
    font-size: 0.9rem; /* Reduced from 1rem */
    opacity: 0.9;
    margin-bottom: 5px; /* Reduced from 8px */
    line-height: 1.4; /* Reduced from 1.5 */
}

.officials-section {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px; /* Reduced from 15px */
    margin-top: 10px; /* Reduced from 15px */
    width: 100%;
    order: 3;
}

.official-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px; /* Reduced from 8px */
    flex: 1;
    min-width: 110px; /* Reduced from 120px */
    max-width: 140px; /* Reduced from 150px */
}

.official-photo {
    width: 75px; /* Reduced from 90px */
    height: 75px; /* Reduced from 90px */
    border-radius: 50%;
    border: 2px solid white; /* Reduced from 3px */
    object-fit: cover;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    background: white;
    padding: 2px;
}

.official-photo:hover {
    transform: scale(1.08);
}

.official-name {
    color: white;
    font-size: 0.8rem; /* Reduced from 0.85rem */
    font-weight: 600;
    text-align: center;
    line-height: 1.2; /* Reduced from 1.3 */
}

/* Updated: Logo images fill the circle */
.logos-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px; /* Reduced from 15px */
    margin-top: 15px; /* Reduced from 20px */
    position: relative;
    z-index: 2;
    width: 100%;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; /* Reduced from 10px */
}

.logo-img {
    width: 75px; /* Reduced from 90px */
    height: 75px; /* Reduced from 90px */
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 2px solid white;
    overflow: hidden;
    position: relative;
}

.logo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.logo-img:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
    background: white;
}

.logo-text {
    color: white;
    font-weight: 700;
    text-align: center;
    font-size: 0.8rem; /* Reduced from 0.85rem */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    padding: 3px 8px; /* Reduced from 4px 10px */
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    line-height: 1.2; /* Reduced from 1.3 */
    height: 35px; /* Reduced from 40px */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Results portal section - added class to replace inline styles */
.results-portal {
    text-align: center;
    color: white;
    margin-top: 15px; /* Reduced from 25px */
    position: relative;
    z-index: 2;
}

.results-portal h2 {
    font-size: 1.5rem; /* Reduced from 1.8rem */
    margin-bottom: 8px; /* Reduced from 12px */
    line-height: 1.3; /* Reduced from 1.4 */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.results-portal p {
    font-size: 0.95rem; /* Reduced from 1.1rem */
    opacity: 0.9;
    line-height: 1.4; /* Reduced from 1.5 */
}

/* Minimal Header for Results Page */
/* Updated: Full width minimal header with relative positioning */
.minimal-header {
    background: var(--gradient-primary);
    border-radius: 0;
    padding: 15px 0;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
    width: 100%;
 
    z-index: 10;
}

.minimal-header .container {
    padding: 15px 20px;
    position: relative;
}

.minimal-header::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.minimal-header h1 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.minimal-header p {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

/* Back Button inside minimal-header */
.minimal-header .back-button {
    position: absolute;
    top: 15px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 4px 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    z-index: 20;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.minimal-header .back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Table Styling */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

th, td {
    padding: 12px 15px;
    text-align: right;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #f8f9fa;
}

tr:hover {
    background-color: #f1f1f1;
}

/* Updated: Different colors for search option cards */
.search-option:nth-child(1) i,
.search-option:nth-child(1) h4 {
    color: #1a237e; /* Blue */
}

.search-option:nth-child(2) i,
.search-option:nth-child(2) h4 {
    color: #4caf50; /* Green */
}

.search-option:nth-child(3) i,
.search-option:nth-child(3) h4 {
    color: #ff9800; /* Orange */
}

.search-option:nth-child(4) i,
.search-option:nth-child(4) h4 {
    color: #f44336; /* Red */
}

.search-option:nth-child(5) i,
.search-option:nth-child(5) h4 {
    color: #9c27b0; /* Purple */
}

.search-option:nth-child(6) i,
.search-option:nth-child(6) h4 {
    color: #00bcd4; /* Cyan */
}

/* Original styles continue... */
.search-section {
    background: white;
    border-radius: 20px;
    padding: 20px 15px;
    margin-bottom: 90px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-section.hide-on-results {
    display: none;
}

.search-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 0 0 0 100px;
    opacity: 0.1;
}

.search-tabs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 15px;
}

.tab-btn {
    padding: 14px 20px;
    border: none;
    background: #f5f5f5;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    text-align: center;
    min-height: 55px;
}

.tab-btn.active {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 172, 193, 0.4);
    transform: translateY(-2px);
}

.tab-btn:hover:not(.active) {
    background: #e0e0e0;
    transform: translateY(-2px);
}

.search-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    animation: fadeIn 0.5s ease;
}

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

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

.form-group label {
    margin-bottom: 10px;
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-control {
    padding: 16px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
}

input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(0, 172, 193, 0.15);
    background: white;
}

.search-btn {
    padding: 18px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    width: 100%;
    min-height: 60px;
}

.search-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.search-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 35, 126, 0.4);
}

.search-btn:hover::before {
    left: 100%;
}

/* Updated: Results Section with overlap */
.results-section {
    background: white;
    border-radius: 20px;
    padding: 20px 15px;
    margin-top: -60px; /* Overlap over minimal-header */
    position: relative;
    z-index: 10;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #f0f0f0;
}

.section-title {
    font-size: 1.5rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: center;
    justify-content: center;
}

/* Student Card for Detailed View */
.student-card {
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 18px;
    padding: 20px 15px;
    margin-bottom: 20px;
    border: 2px solid #e3f2fd;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.student-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 0 0 0 100px;
    opacity: 0.1;
}

.student-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.student-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.student-name {
    font-size: 1.4rem;
    color: var(--primary-color);
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.4;
}

.student-name::before {
    content: '👨‍🎓';
    font-size: 1.2rem;
}

.header-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.num-number {
    background: var(--gradient-secondary);
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 172, 193, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    min-height: 45px;
}

.status-badge {
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-height: 45px;
}

.status-pass {
    background: var(--gradient-success);
    color: white;
}

.status-fail {
    background: var(--gradient-danger);
    color: white;
}

.student-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.detail-item {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 18px 15px;
    border-radius: 12px;
    border-right: 5px solid var(--secondary-color);
    transition: all 0.3s ease;
}

.detail-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
}

.detail-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    line-height: 1.4;
    word-break: break-word;
}

/* School and Edara Links */
.school-link, .edara-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 2px dotted var(--secondary-color);
    padding: 0 2px;
}

.school-link:hover, .edara-link:hover {
    color: var(--secondary-color);
    border-bottom: 2px solid var(--secondary-color);
}

/* Subjects Grid with Progress Bars */
.subjects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin: 25px 0;
}

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

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

.subject-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    border: 2px solid #e3f2fd;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.subject-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.subject-icon {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.subject-title {
    flex: 1;
}

.subject-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 4px;
}

/* Progress Bar Styles */
.progress-bar-container {
    margin: 10px 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.progress-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease, background-color 0.5s ease;
    position: relative;
}

.progress-text {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-weight: bold;
    font-size: 0.8rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #666;
}

.subject-grades {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.grade-term {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 10px;
    text-align: center;
}

.term-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 6px;
}

.term-grade {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.grade-assessment {
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 4px;
}

.grade-excellent { color: #4caf50; }
.grade-very-good { color: #2196f3; }
.grade-good { color: #00bcd4; }
.grade-acceptable { color: #ff9800; }
.grade-weak { color: #f44336; }

.total-grade-container {
    text-align: center;
    margin-top: 30px;
    padding: 25px 15px;
    background: linear-gradient(135deg, #f8fff8 0%, #e8f5e9 100%);
    border-radius: 18px;
    border: 2px solid #4caf50;
}

.total-grade {
    background: var(--gradient-success);
    color: white;
    padding: 16px 25px;
    border-radius: 12px;
    font-size: 1.4rem;
    font-weight: 800;
    display: inline-block;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    min-height: 60px;
}

/* Rank Display */
.rank-container {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 18px;
    padding: 20px;
    margin: 25px 0;
    border: 2px solid #2196f3;
}

.rank-title {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rank-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.rank-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.rank-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.rank-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.rank-label {
    font-size: 1rem;
    color: #666;
    margin-bottom: 8px;
}

.rank-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.rank-total {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.calculate-rank-btn {
    padding: 14px 25px;
    background: var(--gradient-warning);
    color: white;
    border: none;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px auto;
    min-height: 50px;
    text-decoration: none;
}

.calculate-rank-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
}

/* Results List for Search by Name */
.results-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 25px;
}

.result-item {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 18px;
    padding: 20px 15px;
    border: 2px solid #e3f2fd;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.result-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--secondary-color);
}

.result-item-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.result-student-name {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 700;
    line-height: 1.4;
    word-break: break-word;
}

.result-details {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.result-detail {
    background: #f0f7ff;
    padding: 15px 12px;
    border-radius: 10px;
    border-right: 4px solid var(--secondary-color);
}

.result-detail-label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.result-detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    line-height: 1.4;
    word-break: break-word;
}

.rank-badges {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.rank-badge {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: fit-content;
}

.rank-badge i {
    font-size: 0.9rem;
}

.view-details-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--gradient-primary);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    margin-top: 15px;
    width: 100%;
    text-align: center;
    min-height: 50px;
}

.view-details-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(26, 35, 126, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

.pagination-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

.page-link {
    padding: 12px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    color: var(--primary-color);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    min-width: 45px;
    min-height: 45px;
    text-align: center;
}

.page-link:hover {
    background: var(--light-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.page-link.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
}

.page-info {
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    margin: 10px 0;
}

/* Article Section */
.article-section {
    background: white;
    border-radius: 20px;
    padding: 30px 20px;
    margin: 30px 0;
    box-shadow: var(--shadow);
    border-right: 5px solid var(--secondary-color);
}

.article-section h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.article-content {
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
    text-align: justify;
}

.article-content p {
    margin-bottom: 15px;
}

/* Footer - Updated: Full width footer */
.footer {
    background: var(--gradient-primary);
    color: white;
    padding: 30px 0 20px;
    margin-top: 30px;
    border-radius: 20px 20px 0 0;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.footer .container {
    padding: 30px 15px 20px;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: white;
    transform: translateX(-3px);
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: #b0b0b0;
    position: relative;
    z-index: 2;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Statistics */
.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border-top: 5px solid var(--secondary-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    font-size: 2rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    color: #666;
    line-height: 1.3;
}

/* Welcome Message */
.welcome-message {
    text-align: center;
    padding: 40px 20px;
}

.welcome-content {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 30px 20px;
    border-radius: 18px;
    margin-bottom: 25px;
}

.welcome-content i {
    font-size: 3.5rem;
    color: #1a237e;
    margin-bottom: 15px;
}

.welcome-content h3 {
    color: #1a237e;
    font-size: 1.6rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.welcome-content p {
    color: #455a64;
    font-size: 1.1rem;
    margin: 0 auto 15px;
    max-width: 500px;
    line-height: 1.5;
}

.search-options {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 20px;
}

.search-option {
    background: white;
    padding: 20px 15px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.search-option i {
    font-size: 2rem;
    margin-bottom: 10px;
}

.search-option h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.search-option p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
}

.system-info {
    color: #666;
    margin: 0 auto;
    font-size: 1rem;
    max-width: 400px;
    line-height: 1.5;
}

/* Error and Success Messages */
.error-message {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-radius: 18px;
    border: 2px solid #f39c12;
}

.error-message i {
    font-size: 3rem;
    color: #f39c12;
    margin-bottom: 15px;
}

.error-message h3 {
    color: #d35400;
    font-size: 1.5rem;
    margin-bottom: 12px;
}

.error-message p {
    color: #e67e22;
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.success-message {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #2e7d32;
    font-weight: 600;
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    justify-content: center;
    align-items: center;
    padding: 30px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.action-button {
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-family: 'Cairo', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    min-height: 50px;
}

.stat-badge {
    background: var(--gradient-secondary);
    color: white;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* AdSense Container */
.adsense-container {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

/* Media Queries for Larger Screens - Updated for compact header */
@media (min-width: 576px) {
    .container {
padding: 20px;
    }
    
    .header-section .container {
padding: 18px 20px; /* Reduced from 25px 20px */
    }
    
    .minimal-header .container {
padding: 20px;
    }
    
    .minimal-header h1 {
font-size: 1.6rem;
    }
    
    .governor-honor h1 {
font-size: 1.5rem; /* Reduced from 1.8rem */
    }
    
    .governor-honor p {
font-size: 0.95rem; /* Reduced from 1.1rem */
    }
    
    .official-photo {
width: 85px; /* Reduced from 100px */
height: 85px; /* Reduced from 100px */
    }
    
    .official-name {
font-size: 0.85rem; /* Reduced from 0.9rem */
    }
    
    .logo-img {
width: 85px; /* Reduced from 100px */
height: 85px; /* Reduced from 100px */
    }
    
    .logo-text {
font-size: 0.85rem; /* Reduced from 0.9rem */
    }
    
    .search-section {
padding: 25px 20px;
    }
    
    .results-section {
padding: 25px 20px;
margin-top: -60px; /* Adjust overlap for larger screens */
    }
    
    .search-tabs {
flex-direction: row;
flex-wrap: wrap;
    }
    
    .tab-btn {
min-width: calc(50% - 10px);
font-size: 0.95rem;
padding: 12px 15px;
    }
    
    .student-details {
grid-template-columns: repeat(2, 1fr);
    }
    
    .result-details {
grid-template-columns: repeat(2, 1fr);
    }
    
    .stats-container {
grid-template-columns: repeat(4, 1fr);
    }
    
    .stat-card {
min-height: 140px;
    }
    
    .header-badges {
flex-direction: row;
justify-content: center;
    }
    
    .num-number, .status-badge {
min-width: 180px;
    }
    
    /* Updated: Back button positioning for tablet */
    .minimal-header .back-button {
top: 20px;
right: 25px;
padding: 4px 18px;
font-size: 1rem;
    }
    
    .results-portal h2 {
font-size: 1.5rem; /* Reduced from 1.8rem */
    }
    
    .results-portal p {
font-size: 1rem; /* Reduced from 1.1rem */
    }
    
    .search-options {
grid-template-columns: repeat(2, 1fr);
    }
    
    .rank-badges {
flex-direction: row;
flex-wrap: wrap;
    }
}

@media (min-width: 768px) {
    .container {
padding: 25px;
    }
    
    .header-section .container {
padding: 20px 25px; /* Reduced from 30px 25px */
    }
    
    .minimal-header .container {
padding: 25px;
    }
    
    .minimal-header h1 {
font-size: 1.8rem;
    }
    
    .gov-branding {
flex-direction: row;
text-align: right;
align-items: flex-start;
    }
    
    /* Updated: Reorder for desktop - governor photo on left, officials on right */
    .gov-branding {
flex-direction: row-reverse;
    }
    
    .governor-item {
order: 1;
margin-bottom: 0;
    }
    
    .governor-honor {
text-align: right;
flex: 1;
order: 2;
margin-left: 30px;
    }
    
    .officials-section {
order: 3;
margin-top: 0;
    }
    
    .governor-honor h1 {
font-size: 1.7rem; /* Reduced from 2rem */
    }
    
    .official-photo {
width: 95px; /* Reduced from 110px */
height: 95px; /* Reduced from 110px */
    }
    
    .logo-img {
width: 95px; /* Reduced from 110px */
height: 95px; /* Reduced from 110px */
    }
    
    .logos-container {
grid-template-columns: repeat(4, 1fr);
    }
    
    .search-section {
padding: 30px 25px;
    }
    
    .results-section {
padding: 30px 25px;
margin-top: -60px; /* Adjust overlap for desktop */
    }
    
    .search-tabs {
flex-direction: row;
    }
    
    .tab-btn {
min-width: auto;
width: auto;
flex: 1;
    }
    
    .search-form {
grid-template-columns: repeat(2, 1fr);
    }
    
    .section-header {
flex-direction: row;
justify-content: space-between;
align-items: center;
    }
    
    .section-title {
justify-content: flex-start;
text-align: right;
    }
    
    .student-header {
flex-direction: row;
justify-content: space-between;
align-items: center;
    }
    
    .header-badges {
flex-direction: row;
width: auto;
    }
    
    .student-details {
grid-template-columns: repeat(4, 1fr);
    }
    
    .results-list {
grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
grid-template-columns: repeat(2, 1fr);
    }
    
    .pagination {
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
    }
    
    .pagination-row {
width: auto;
    }
    
    .action-buttons {
flex-direction: row;
    }
    
    .search-options {
grid-template-columns: repeat(4, 1fr);
    }
    
    /* Updated: Back button positioning for desktop */
    .minimal-header .back-button {
top: 25px;
right: 30px;
padding: 10px 20px;
font-size: 1.1rem;
    }
    
    .results-portal h2 {
font-size: 1.6rem; /* Reduced from 1.8rem */
    }
}

@media (min-width: 992px) {
    .governor-honor h1 {
font-size: 1.8rem; /* Reduced from 2.2rem */
    }
    
    .official-photo {
width: 100px; /* Reduced from 120px */
height: 100px; /* Reduced from 120px */
    }
    
    .logo-img {
width: 100px; /* Reduced from 120px */
height: 100px; /* Reduced from 120px */
    }
    
    .search-form {
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .results-list {
grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
grid-template-columns: repeat(4, 1fr);
    }
    
    .results-portal h2 {
font-size: 1.7rem; /* Reduced from 1.8rem */
    }
    
    .results-section {
margin-top: -60px;
    }
}

@media (min-width: 1200px) {
    .container {
padding: 30px;
    }
    
    .header-section .container {
padding: 25px 30px; /* Reduced from 35px 30px */
    }
    
    .minimal-header .container {
padding: 30px;
    }
    
    .governor-honor h1 {
font-size: 2rem; /* Reduced from 2.5rem */
    }
    
    .official-photo {
width: 110px; /* Reduced from 140px */
height: 110px; /* Reduced from 140px */
    }
    
    .logo-img {
width: 110px; /* Reduced from 140px */
height: 110px; /* Reduced from 140px */
    }
    
    .search-section {
padding: 35px 30px;
    }
    
    .results-section {
padding: 35px 30px;
margin-top: -60px;
    }
    
    .student-details {
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .results-portal h2 {
font-size: 1.8rem; /* Reduced from 2rem */
    }
}

/* Animation */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}
@media print {
    .search-section, .footer, .search-btn, .pagination, .back-button, .action-buttons,
    .adsense-container, .article-section, .tab-btn, .results-portal {
display: none !important;
    }
    
    /* Force desktop layout for print */
    .student-card, .result-item {
box-shadow: none !important;
border: 2px solid #000 !important;
break-inside: avoid;
page-break-inside: avoid;
margin: 20px 0 !important;
width: 100% !important;
max-width: 100% !important;
    }
    
    body {
background: white !important;
color: black !important;
font-size: 12pt !important;
width: 100% !important;
margin: 0 !important;
padding: 10px !important;
    }
    
    .container {
max-width: 100% !important;
padding: 10px !important;
margin: 0 !important;
width: 100% !important;
    }
    
    .minimal-header {
background: white !important;
color: black !important;
border-bottom: 2px solid black !important;
padding: 10px 0 !important;
    }
    
    .minimal-header h1 {
color: black !important;
font-size: 16pt !important;
    }
    
    .minimal-header .back-button {
display: none !important;
    }
    
    .results-section {
margin-top: 0 !important;
box-shadow: none !important;
padding: 10px !important;
width: 100% !important;
    }
    
    /* Force grid layouts for print */
    .subjects-grid {
grid-template-columns: repeat(3, 1fr) !important;
gap: 10px !important;
    }
    
    .student-details {
grid-template-columns: repeat(4, 1fr) !important;
    }
    
    .results-list {
grid-template-columns: repeat(3, 1fr) !important;
    }
    
    .result-details {
grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .subject-card {
page-break-inside: avoid;
border: 1px solid #ccc !important;
padding: 10px !important;
    }
    
    .progress-bar {
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
    }
    
    .header-section, .footer {
display: none !important;
    }
    
    a {
color: black !important;
text-decoration: none !important;
    }
    
    .detail-item, .result-detail {
border: 1px solid #ccc !important;
padding: 8px !important;
    }
    
    .total-grade-container {
border: 2px solid black !important;
background: white !important;
    }
    
    .total-grade {
-webkit-print-color-adjust: exact !important;
print-color-adjust: exact !important;
background: #f0f0f0 !important;
color: black !important;
    }
    
    /* Ensure full width */
    .full-width-container {
width: 100% !important;
max-width: 100% !important;
margin: 0 !important;
padding: 0 !important;
    }
    
    /* Print specific page breaks */
    .student-card {
page-break-inside: avoid;
page-break-after: auto;
    }
    
    @page {
size: A4;
margin: 15mm;
    }
}

/* Mobile Specific Enhancements */
@media (max-width: 576px) {
    .student-name {
font-size: 1.3rem;
    }
    
    .total-grade {
font-size: 1.2rem;
padding: 14px 20px;
    }
    
    .stat-card {
padding: 15px 10px;
    }
    
    .stat-icon {
font-size: 1.8rem;
    }
    
    .stat-number {
font-size: 1.6rem;
    }
    
    /* Updated: Back button positioning for mobile */
    .minimal-header .back-button {
top: 10px;
right: 15px;
padding: 6px 12px;
font-size: 0.8rem;
    }
}

/* Touch-friendly improvements */
button, 
.tab-btn,
.search-btn,
.page-link,
.view-details-btn,
.action-button {
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}

.back-button{
    touch-action: manipulation;
    min-width: 44px;	
}

input, 
select, 
textarea {
    font-size: 16px; /* Prevents zoom on iOS */
}

select.form-control {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%231a237e' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 15px center;
    background-size: 12px;
    padding-right: 15px;
    padding-left: 35px;
    cursor: pointer;
}

/* Certificate Modal Styles */
#certificateModal {
    animation: fadeIn 0.3s ease;
}

#certificateModal > div {
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
transform: translateY(-50px);
opacity: 0;
    }
    to {
transform: translateY(0);
opacity: 1;
    }
}

/* ============================
   HEADER SECTION - COMPACT DESIGN
   ============================ */

/* Base mobile-first header styles - VERY COMPACT */
.header-section {
    background: var(--gradient-primary);
    border-radius: 0;
    padding: 8px 0; /* Reduced from 15px */
    margin-bottom: 10px; /* Reduced from 15px */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    width: 100%;
}

.header-section .container {
    padding: 10px 12px; /* Reduced from 15px */
}

/* Gov branding - compact stack for mobile */
.gov-branding {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 12px; /* Reduced from 15px */
    gap: 12px; /* Reduced from 15px */
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Governor item - smaller on mobile */
.governor-item {
    order: 1;
    margin-bottom: 12px; /* Reduced from 15px */
}

.governor-photo {
    width: 70px; /* Reduced from 75px */
    height: 70px; /* Reduced from 75px */
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
    background: white;
    padding: 2px;
}

.governor-photo:hover {
    transform: scale(1.05);
}

.governor-honor {
    text-align: center;
    color: white;
    width: 100%;
    order: 2;
}

.governor-honor h1 {
    font-size: 1.2rem; /* Reduced from 1.4rem */
    margin-bottom: 6px; /* Reduced from 8px */
    background: linear-gradient(45deg, #fff, #e0f7fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.governor-honor p {
    font-size: 0.8rem; /* Reduced from 0.9rem */
    opacity: 0.9;
    margin-bottom: 4px; /* Reduced from 5px */
    line-height: 1.3;
}

/* Officials section - more compact */
.officials-section {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px; /* Reduced from 10px */
    margin-top: 8px; /* Reduced from 10px */
    width: 100%;
    order: 3;
}

.official-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px; /* Reduced from 6px */
    flex: 1;
    min-width: 100px; /* Reduced from 110px */
    max-width: 120px; /* Reduced from 140px */
}

.official-photo {
    width: 65px; /* Reduced from 75px */
    height: 65px; /* Reduced from 75px */
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transition: transform 0.3s ease;
    background: white;
    padding: 2px;
}

.official-photo:hover {
    transform: scale(1.05);
}

.official-name {
    color: white;
    font-size: 0.7rem; /* Reduced from 0.8rem */
    font-weight: 600;
    text-align: center;
    line-height: 1.1;
}

/* Logos - more compact */
.logos-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px; /* Reduced from 12px */
    margin-top: 12px; /* Reduced from 15px */
    position: relative;
    z-index: 2;
    width: 100%;
}

.logo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px; /* Reduced from 8px */
}

.logo-img {
    width: 65px; /* Reduced from 75px */
    height: 65px; /* Reduced from 75px */
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    border: 2px solid white;
    overflow: hidden;
    position: relative;
}

.logo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
}

.logo-img:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.logo-text {
    color: white;
    font-weight: 600; /* Reduced from 700 */
    text-align: center;
    font-size: 0.75rem; /* Reduced from 0.8rem */
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    padding: 2px 6px; /* Reduced from 3px 8px */
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px; /* Reduced from 8px */
    line-height: 1.1;
    height: 30px; /* Reduced from 35px */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Results portal - more compact */
.results-portal {
    text-align: center;
    color: white;
    margin-top: 12px; /* Reduced from 15px */
    position: relative;
    z-index: 2;
}

.results-portal h2 {
    font-size: 1.5rem; /* Reduced from 1.4rem */
    margin-bottom: 6px; /* Reduced from 8px */
    line-height: 1.2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px; /* Reduced from 8px */
}

.results-portal p {
    font-size: 0.85rem; /* Reduced from 0.95rem */
    opacity: 0.9;
    line-height: 1.3;
}

/* ============================
   TABLET (576px and above)
   ============================ */
@media (min-width: 576px) {
    .header-section {
padding: 10px 0; /* Reduced from 15px 0 */
    }
    
    .header-section .container {
padding: 12px 15px; /* Reduced from 18px 20px */
    }
    
    .governor-honor h1 {
font-size: 1.3rem; /* Reduced from 1.5rem */
    }
    
    .governor-honor p {
font-size: 0.85rem; /* Reduced from 0.95rem */
    }
    
    .official-photo {
width: 70px; /* Reduced from 85px */
height: 70px; /* Reduced from 85px */
    }
    
    .official-name {
font-size: 0.75rem; /* Reduced from 0.85rem */
    }
    
    .logo-img {
width: 70px; /* Reduced from 85px */
height: 70px; /* Reduced from 85px */
    }
    
    .logo-text {
font-size: 0.8rem; /* Reduced from 0.85rem */
    }
    
    .results-portal h2 {
font-size: 1.5rem; /* Reduced from 1.5rem */
    }
    
    .results-portal p {
font-size: 0.9rem; /* Reduced from 1rem */
    }
}

/* ============================
   DESKTOP (768px and above)
   ============================ */
@media (min-width: 768px) {
    .header-section {
padding: 12px 0; /* Reduced from 20px 0 */
    }
    
    .header-section .container {
padding: 15px 20px; /* Reduced from 25px 25px */
    }
    
    /* Switch to horizontal layout for desktop */
    .gov-branding {
flex-direction: row;
align-items: flex-start;
text-align: right;
margin-bottom: 15px; /* Reduced from 20px */
    }
    
    /* Governor photo on left */
    .governor-item {
order: 1;
margin-bottom: 0;
    }
    
    .governor-photo {
width: 80px; /* Reduced from 95px */
height: 80px; /* Reduced from 95px */
    }
    
    /* Governor honor in middle */
    .governor-honor {
flex: 1;
order: 2;
margin: 0 15px; /* Reduced from 30px */
text-align: center;
    }
    
    .governor-honor h1 {
font-size: 1.4rem; /* Reduced from 1.7rem */
    }
    
    .governor-honor p {
font-size: 0.9rem; /* Reduced from 1rem */
    }
    
    /* Officials on right */
    .officials-section {
order: 3;
margin-top: 0;
flex-direction: column;
gap: 6px; /* Reduced from 8px */
    }
    
    .official-item {
flex-direction: row;
min-width: auto;
max-width: none;
gap: 8px; /* Reduced from 10px */
    }
    
    .official-photo {
width: 50px; /* Smaller for horizontal layout */
height: 50px; /* Smaller for horizontal layout */
    }
    
    .official-name {
font-size: 0.75rem; /* Reduced from 0.85rem */
text-align: right;
    }
    
    /* Logos in 4 columns */
    .logos-container {
grid-template-columns: repeat(4, 1fr);
gap: 10px; /* Reduced from 15px */
    }
    
    .logo-img {
width: 75px; /* Reduced from 95px */
height: 75px; /* Reduced from 95px */
    }
    
    .logo-text {
font-size: 0.85rem; /* Reduced from 0.9rem */
height: 28px; /* Reduced from 35px */
    }
    
    .results-portal h2 {
font-size: 1.5rem; /* Reduced from 1.6rem */
    }
}

/* ============================
   LARGE DESKTOP (992px and above)
   ============================ */
@media (min-width: 992px) {
    .header-section .container {
padding: 18px 25px; /* Reduced from 30px 25px */
    }
    
    .governor-photo {
width: 85px; /* Reduced from 100px */
height: 85px; /* Reduced from 100px */
    }
    
    .governor-honor h1 {
font-size: 1.5rem; /* Reduced from 1.8rem */
    }
    
    .official-photo {
   
    }
    
    .logo-img {
width: 80px; /* Reduced from 100px */
height: 80px; /* Reduced from 100px */
    }
    
    .results-portal h2 {
font-size: 1.5rem; /* Reduced from 1.7rem */
    }
}

/* ============================
   EXTRA LARGE DESKTOP (1200px and above)
   ============================ */
@media (min-width: 1200px) {
    .header-section {
padding: 15px 0; /* Reduced from 25px 0 */
    }
    
    .header-section .container {
padding: 20px 30px; /* Reduced from 35px 30px */
    }
    
    .governor-photo {
width: 90px; /* Reduced from 110px */
height: 90px; /* Reduced from 110px */
    }
    
    .governor-honor h1 {
font-size: 1.6rem; /* Reduced from 2rem */
    }
    
    .official-photo {
width: 60px; /* Adjusted */
height: 60px; /* Adjusted */
    }
    
    .official-name {
font-size: 0.8rem; /* Reduced from 0.9rem */
    }
    
    .logo-img {
width: 85px; /* Reduced from 110px */
height: 85px; /* Reduced from 110px */
    }
    
    .results-portal h2 {
font-size: 1.6rem; /* Reduced from 1.8rem */
    }
}

/* ============================
   VERY SMALL MOBILE (max-width: 375px)
   ============================ */
@media (max-width: 375px) {
    .header-section {
padding: 6px 0;
    }
    
    .header-section .container {
padding: 8px 10px;
    }
    
    .gov-branding {
margin-bottom: 10px;
gap: 10px;
    }
    
    .governor-photo {
width: 60px;
height: 60px;
    }
    
    .governor-honor h1 {
font-size: 1.1rem;
    }
    
    .governor-honor p {
font-size: 0.75rem;
    }
    
    .official-item {
min-width: 90px;
max-width: 100px;
    }
    
    .official-photo {

    }
    
    .official-name {
font-size: 0.65rem;
    }
    
    .logo-img {
width: 55px;
height: 55px;
    }
    
    .logo-text {
font-size: 0.7rem;
height: 26px;
padding: 2px 4px;
    }
    
    .results-portal h2 {
font-size: 1.5rem;
gap: 2px;
    }
    
    .results-portal p {
font-size: 0.8rem;
    }
}

/* ============================
   PRINT STYLES
   ============================ */
@media print {
    .header-section {
background: white !important;
color: black !important;
padding: 5px 0 !important;
box-shadow: none !important;
border-bottom: 2px solid black !important;
    }
    
    .header-section .container {
padding: 5px 10px !important;
    }
    
    .governor-honor h1 {
-webkit-text-fill-color: black !important;
background: none !important;
color: black !important;
font-size: 12pt !important;
    }
    
    .governor-honor p,
    .official-name,
    .logo-text,
    .results-portal h2,
    .results-portal p {
color: black !important;
text-shadow: none !important;
background: none !important;
    }
    
    .official-photo,
    .governor-photo,
    .logo-img {
border: 1px solid black !important;
box-shadow: none !important;
    }
}

/* ============================
   FLOATING TELEGRAM BUTTON
   ============================ */
.floating-telegram-btn {
    position: fixed;
    bottom: 100px; /* Position above WhatsApp/share buttons */
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
    text-decoration: none;
    z-index: 9999;
    transition: all 0.3s ease;
    border: 2px solid white;
    animation: float 3s ease-in-out infinite;
}

.floating-telegram-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 136, 204, 0.6);
    background: linear-gradient(135deg, #0088cc 0%, #0099cc 100%);
}

@keyframes float {
    0% {
transform: translateY(0px);
    }
    50% {
transform: translateY(-10px);
    }
    100% {
transform: translateY(0px);
    }
}

/* ============================
   SHARE BUTTONS FOR STUDENT RESULT
   ============================ */
.share-buttons-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 20px;
    margin: 25px 0;
    border: 2px solid #e0e0e0;
    text-align: center;
}

.share-buttons-container h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    min-width: 120px;
    border: none;
    cursor: pointer;
    color: white;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.share-btn-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
}

.share-btn-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #0d5cb6 100%);
}

.share-btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #1da851 100%);
}

.share-btn-messenger {
    background: linear-gradient(135deg, #006aff 0%, #0052cc 100%);
}

.share-btn-copy {
    background: linear-gradient(135deg, #666 0%, #444 100%);
}

/* For mobile */
@media (max-width: 768px) {
    .floating-telegram-btn {
width: 50px;
height: 50px;
font-size: 24px;
bottom: 90px;
right: 15px;
    }
    
    .share-buttons {
gap: 8px;
    }
    
    .share-btn {
min-width: calc(50% - 4px);
padding: 10px 15px;
font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .floating-telegram-btn {
width: 45px;
height: 45px;
font-size: 22px;
bottom: 80px;
right: 12px;
    }
    
    .share-btn {
min-width: 100%;
    }
}

/* Weak Subjects Warning Card Styles */
.weak-subjects-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffecb3 100%);
    border-radius: 18px;
    padding: 20px;
    margin: 25px 0;
    border: 2px solid #ff9800;
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.15);
    animation: pulseWarning 2s infinite;
}

@keyframes pulseWarning {
    0% { box-shadow: 0 6px 20px rgba(255, 152, 0, 0.15); }
    50% { box-shadow: 0 6px 25px rgba(255, 152, 0, 0.25); }
    100% { box-shadow: 0 6px 20px rgba(255, 152, 0, 0.15); }
}

.warning-header {
    text-align: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #ff9800;
    padding-bottom: 15px;
}

.warning-header i {
    font-size: 2.5rem;
    color: #ff9800;
    margin-bottom: 10px;
}

.warning-header h4 {
    color: #e65100;
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.warning-header p {
    color: #f57c00;
    font-size: 1rem;
    margin: 0;
}

.weak-subjects-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.weak-subject-item {
    background: white;
    border-radius: 12px;
    padding: 15px;
    border-right: 4px solid #ff9800;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.weak-subject-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.weak-subject-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.weak-subject-name {
    font-weight: 700;
    color: #333;
    font-size: 1.1rem;
}

.weak-subject-grade {
    color: #f44336;
    font-weight: 600;
    font-size: 1rem;
}

.weak-subject-percentage {
    display: flex;
    align-items: center;
    gap: 15px;
}

.percentage-badge {
    background: #f44336;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    min-width: 70px;
    text-align: center;
}

.weak-progress-bar {
    flex: 1;
    height: 10px;
    background: #ffcdd2;
    border-radius: 5px;
    overflow: hidden;
}

.weak-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f44336 0%, #ef5350 100%);
    border-radius: 5px;
    transition: width 0.5s ease;
}

.warning-advice {
    text-align: center;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border: 1px dashed #ff9800;
}

.warning-advice p {
    color: #e65100;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.warning-advice i {
    color: #ff9800;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .weak-subject-info {
flex-direction: column;
align-items: flex-start;
gap: 5px;
    }
    
    .weak-subject-percentage {
flex-direction: column;
align-items: flex-start;
gap: 8px;
width: 100%;
    }
    
    .weak-progress-bar {
width: 100%;
    }
    
    .warning-advice p {
font-size: 0.95rem;
flex-direction: column;
gap: 5px;
    }
}

/* RESULTS BANNER STYLES */
.results-banner {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3);
    border: 2px solid #4CAF50;
    position: relative;
    overflow: hidden;
    animation: success-pulse 3s infinite;
}

.results-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #FFEB3B, #4CAF50, #2196F3);
    animation: rainbow-border 3s infinite linear;
}

.ribbon {
    position: absolute;
    top: 15px;
    left: -35px;
    background: linear-gradient(135deg, #2196F3, #0D47A1);
    color: white;
    padding: 8px 40px;
    transform: rotate(-45deg);
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 2;
}

.results-content {
    display: flex;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.results-icon {
    font-size: 2.5rem;
    background: rgba(255, 255, 255, 0.15);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: celebrate 2s infinite alternate;
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

.results-text {
    flex: 1;
    text-align: right;
}

.results-text h4 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.badge {
    background: #FFEB3B;
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    animation: badge-bounce 1s infinite alternate;
}

.results-info p {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    opacity: 0.95;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stats-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin: 15px 0;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: #FFEB3B;
}

.stat-value.success {
    color: #81C784;
    font-size: 1.5rem;
}

.view-results-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, #2196F3, #0D47A1);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
    border: none;
    cursor: pointer;
}

.view-results-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
    background: linear-gradient(135deg, #0D47A1, #2196F3);
}

.governor-seal {
    position: absolute;
    bottom: -15px;
    left: -15px;
    background: rgba(255, 255, 255, 0.95);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #2E7D32;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: seal-spin 20s infinite linear;
    border: 3px solid #FF9800;
}

.governor-seal i {
    font-size: 2rem;
    margin-bottom: 5px;
}

.governor-seal span {
    font-size: 0.8rem;
    font-weight: 700;
}

@keyframes success-pulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(76, 175, 80, 0.3); }
    50% { box-shadow: 0 4px 30px rgba(76, 175, 80, 0.5); }
}

@keyframes celebrate {
    0% { transform: scale(1) rotate(0deg); }
    100% { transform: scale(1.1) rotate(10deg); }
}

@keyframes badge-bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

@keyframes rainbow-border {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

@keyframes seal-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .results-content {
flex-direction: column;
text-align: center;
gap: 15px;
    }
    
    .results-text h4 {
flex-direction: column;
font-size: 1.2rem;
text-align: center;
    }
    
    .stats-container {
flex-direction: column;
gap: 10px;
    }
    
    .stat-item {
display: flex;
justify-content: space-between;
align-items: center;
    }
    
    .governor-seal {
width: 60px;
height: 60px;
bottom: -10px;
left: -10px;
    }
    
    .ribbon {
font-size: 0.8rem;
padding: 6px 35px;
left: -30px;
    }
}
.notice-banner {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
    border: 2px solid #ff9800;
    text-align: center;
    animation: pulse 2s infinite;
    position: relative;
    overflow: hidden;
}

.notice-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
}

.notice-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 1;
}

.notice-icon {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s infinite;
}

.notice-text {
    flex: 1;
    text-align: right;
}

.notice-text h4 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.notice-text p {
    margin: 0;
    font-size: 1rem;
    opacity: 0.95;
}

@keyframes pulse {
    0% { box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3); }
    50% { box-shadow: 0 4px 25px rgba(255, 152, 0, 0.5); }
    100% { box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

@media (max-width: 768px) {
    .notice-content {
flex-direction: column;
text-align: center;
gap: 10px;
    }
    
    .notice-text h4 {
font-size: 1.1rem;
    }
    
    .notice-text p {
font-size: 0.9rem;
    }
    
    .notice-icon {
width: 40px;
height: 40px;
font-size: 1.5rem;
    }
}
/* ============================
   ARTICLE SECTION STYLING ENHANCEMENTS
   ============================ */

/* Style for ordered list in article section */
.article-section .article-content ol {
    list-style: none;
    counter-reset: edara-counter;
    padding: 0;
    margin: 25px 0 35px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.article-section .article-content ol li {
    counter-increment: edara-counter;
    position: relative;
    padding-right: 55px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 10px 45px 10px 10px;
    border: 2px solid #e3f2fd;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.article-section .article-content ol li:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.article-section .article-content ol li::before {
    content: counter(edara-counter);
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(26, 35, 126, 0.3);
}

.article-section .article-content ol li a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.5;
    display: block;
    transition: all 0.3s ease;
    padding: 5px 0;
    position: relative;
}

.article-section .article-content ol li a:hover {
    color: var(--secondary-color);
    transform: translateX(-5px);
}

.article-section .article-content ol li a::after {
    content: '→';
    position: absolute;
    left: -25px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.article-section .article-content ol li a:hover::after {
    opacity: 1;
    left: -20px;
}

/* Enhanced styling for h2 inside article section */
.article-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin: 30px 0 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--secondary-color);
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    line-height: 1.4;
}

.article-section h2::before {
    content: '';
    width: 8px;
    height: 35px;
    background: var(--gradient-primary);
    border-radius: 4px;
    display: inline-block;
}

/* Enhanced styling for h3 inside article section */
.article-section h3 {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin: 25px 0 15px;
    padding: 15px 20px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    border-right: 5px solid var(--accent-color);
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 1.4;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.article-section h3 i {
    color: var(--accent-color);
    font-size: 1.3em;
    background: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .article-section .article-content ol {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .article-section .article-content ol li {
        padding: 10px 45px 15px 10px;
    }
    
    .article-section .article-content ol li::before {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .article-section h2 {
        font-size: 1.5rem;
        margin: 25px 0 15px;
        padding-bottom: 12px;
    }
    
    .article-section h3 {
        font-size: 1.3rem;
        margin: 20px 0 15px;
        padding: 12px 15px;
    }
    
    .article-section h3 i {
        width: 40px;
        height: 40px;
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .article-section .article-content ol li {
         padding: 10px 45px 15px 10px;
    }
    
    .article-section .article-content ol li a {
        font-size: 1rem;
    }
    
    .article-section h2 {
        font-size: 1.3rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .article-section h2::before {
        width: 100%;
        height: 4px;
        margin-bottom: 10px;
    }
    
    .article-section h3 {
        font-size: 1.2rem;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .article-section h3 i {
        align-self: center;
    }
}

/* Animation for list items */
@keyframes fadeInUpList {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-section .article-content ol li {
    animation: fadeInUpList 0.5s ease forwards;
    animation-delay: calc(var(--item-index) * 0.1s);
    opacity: 0;
}

/* Add this for even list items to have different background */
.article-section .article-content ol li:nth-child(even) {
    background: linear-gradient(135deg, #f0f7ff 0%, #e1f5fe 100%);
    border-color: #bbdefb;
}

/* Special styling for the list item numbers on hover */
.article-section .article-content ol li:hover::before {
    background: var(--gradient-secondary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 15px rgba(0, 172, 193, 0.4);
}