/* ===== ROOT VARIABLES ===== */
:root {
    --primary-color: #004ab9;
    --secondary-color: #004ab9;
    --accent-color: #ffd23f;
    --dark-color: #004ab9 !important;
    --light-color: #f8f9fa;
    --text-color: #333;
    --text-light: #6c757d;
    
    --font-display: 'Playfair Display', serif;
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
}



/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh;
    background: var(--secondary-color),
                url('https://images.unsplash.com/photo-1523050854058-8df90110c9f1?w=1600') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}


.hero-section::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 210, 63, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 107, 53, 0.15) 0%, transparent 50%);
    animation: pulseOverlay 8s ease-in-out infinite;
}

@keyframes pulseOverlay {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    padding: 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 2px 4px 8px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    font-weight: 300;
    margin-bottom: 2.5rem;
    letter-spacing: 2px;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-buttons .btn {
    margin: 0.5rem;
    padding: 1rem 2.5rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.4s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-15px); }
    60% { transform: translateX(-50%) translateY(-10px); }
}

/* ===== SECTIONS ===== */
.section-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
    color: var(--dark-color);
}

.section-text {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* ===== WELCOME SECTION ===== */
.welcome-section {
    background: white;
    padding: 6rem 0;
}

.welcome-image-wrapper {
    position: relative;
}

.image-decoration {
    position: absolute;
    top: -20px;
    left: -20px;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    z-index: -1;
    opacity: 0.2;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.welcome-image-wrapper img {
    position: relative;
    z-index: 1;
    transition: transform 0.5s ease;
}


.feature-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.feature-list li {
    padding: 0.8rem 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 15px;
    opacity: 0;
    animation: fadeInRight 0.8s ease-out forwards;
}

.feature-list li:nth-child(1) { animation-delay: 0.2s; }
.feature-list li:nth-child(2) { animation-delay: 0.4s; }
.feature-list li:nth-child(3) { animation-delay: 0.6s; }
.feature-list li:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-list i {
    color: var(--secondary-color);
    font-size: 1.3rem;
}

/* ===== STATS SECTION ===== */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color), #1e3d6f);
    color: white;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
    animation: movePattern 20s linear infinite;
}

@keyframes movePattern {
    from { background-position: 0 0; }
    to { background-position: 60px 60px; }
}

.stat-item {
    padding: 2rem;   
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 400;
    font-family: var(--font-body);
    margin-bottom: 0.5rem;
    color: white;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

/* ===== CTA SECTION ===== */
.cta-section {
    padding: 4rem 0;
}

.cta-wrapper {
    background:  #e05520;
    padding: 4rem 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.cta-title {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-text {
    color: rgba(255,255,255,0.9);
    font-size: 1.2rem;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-color) !important;  /* #004ab9 */
    color: white !important;
}

.footer-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent-color);  /* #ffd23f - yellow highlight */
}

.footer-subtitle {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);  /* #ffd23f - yellow highlight */
}

.footer-links a {
    color: var(--light-color);   /* #f8f9fa */
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent-color);  /* #ffd23f */
    padding-left: 5px;
}

.footer-contact li {
    color: var(--light-color);   /* #f8f9fa */
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.footer-contact i {
    color: var(--light-color) !important;  /* #ffd23f - icon color */
    margin-top: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--light-color);   /* #f8f9fa */
}

.social-links a {
    background: rgba(255, 255, 255, 0.1);
    color: var(--light-color);
}

.social-links a:hover {
    background: var(--accent-color);  /* #ffd23f */
    transform: translateY(-5px) rotate(360deg);
}
/* ===== PAGE HEADER ===== */
.page-header {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, var(--primary-color), #1e3d6f);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    width: 100%;
}

.page-header::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,210,63,0.1) 0%, transparent 70%);
    top: -50%;
    left: -50%;
    z-index: -1;
    animation: rotateBackground 20s linear infinite;
}

@keyframes rotateBackground {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.page-header h1 {
    margin-top: 20px !important;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.page-header p {
    font-size: 1.3rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
    padding: 1rem 0;
}

.content-card {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    margin-bottom: 3rem;
    transition: all 0.4s ease;
    opacity: 0;
    animation: fadeInScale 0.8s ease-out forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.content-card:hover {
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    transform: translateY(-5px);
}

.content-card h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--secondary-color);
}

.content-card h3 {
    color: var(--dark-color);
    margin: 1.5rem 0 1rem;
}

/* ===== GALLERY ===== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    aspect-ratio: 4/3;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    opacity: 0;
    animation: zoomIn 0.6s ease-out forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.15);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay h3 {
    color: white;
    font-size: 1.3rem;
    margin: 0;
}

/* ===== FORMS ===== */
.form-control {
    padding: 0.8rem 1.2rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
    transform: translateY(-2px);
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

textarea.form-control {
    min-height: 150px;
}

/* ===== TABLES ===== */
.table thead {
    background: linear-gradient(135deg, var(--primary-color), #2e5cb8);
    color: white;
}

.table tbody tr {
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: #f8f9fa;
    transform: scale(1.01);
}

/* ===== UTILITY CLASSES ===== */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-pattern {
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(44, 90, 160, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 107, 53, 0.05) 0%, transparent 50%);
}

.icon-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.2rem; }
    .section-title { font-size: 2rem; }
    .stat-number { font-size: 3rem; }
    .cta-title { font-size: 2rem; }
    .page-header h1 { font-size: 2.5rem; }
    .navbar-brand { font-size: 1.2rem; }
    .content-card { padding: 2rem 1.5rem; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

/* ===== ADMISSION POPUP ===== */
#admissionOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.82);
    backdrop-filter: blur(6px);
    z-index: 9999;
    overflow-y: auto;
    padding: 30px 15px;
    animation: fadeOverlay 0.35s ease;
}

@keyframes fadeOverlay { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

#admissionModal {
    background: #fff;
    max-width: 860px;
    margin: auto;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.45);
    animation: slideUp 0.4s cubic-bezier(0.22,1,0.36,1);
    position: relative;
}

@keyframes slideUp { 
    from { transform: translateY(60px); opacity: 0; } 
    to { transform: translateY(0); opacity: 1; } 
}

/* Admission Header */
.adm-header {
    background: linear-gradient(135deg, #8b1a1a 0%, #c0392b 50%, #8b1a1a 100%);
    padding: 28px 36px 22px;
    position: relative;
    overflow: hidden;
}

.adm-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 20px,
        rgba(255,255,255,0.04) 20px,
        rgba(255,255,255,0.04) 40px
    );
}

.adm-header-inner { 
    position: relative; 
    z-index: 1; 
}

.adm-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: #ffd700;
    /* font-family: 'Raleway', sans-serif; */
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    padding: 4px 14px;
    border: 1px solid rgba(255,215,0,0.4);
    margin-bottom: 10px;
}

.adm-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.2rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
    line-height: 1.1;
}

.adm-title span { 
    color: #ffd700; 
    font-style: italic; 
}

.adm-subtitle {
    color: rgba(255,255,255,0.75);
    /* font-family: 'Raleway', sans-serif; */
    font-size: 13px;
    margin-top: 6px;
    letter-spacing: 0.5px;
}

.adm-close {
    position: absolute;
    top: 16px; 
    right: 20px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    width: 34px; 
    height: 34px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: background 0.2s;
    z-index: 10;
}

.adm-close:hover { 
    background: rgba(255,255,255,0.3); 
}

/* Form Body */
.adm-body { 
    padding: 28px 36px 10px; 
}

/* Section Divider */
.adm-section {
    margin-bottom: 20px;
}

.adm-section-title {
    /* font-family: 'Raleway', sans-serif; */
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #8b1a1a;
    border-bottom: 2px solid #8b1a1a;
    padding-bottom: 6px;
    margin-bottom: 16px;
}

/* Form Controls */
.adm-label {
    /* font-family: 'Raleway', sans-serif; */
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #444;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.adm-control {
    border: 1.5px solid #e0d6d6;
    border-radius: 0;
    /* font-family: 'Raleway', sans-serif; */
    font-size: 13.5px;
    padding: 9px 13px;
    background: #fdfafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.adm-control:focus {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
    outline: none;
    background: #fff;
}

select.adm-control { 
    appearance: none; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%238b1a1a' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); 
    background-repeat: no-repeat; 
    background-position: right 13px center; 
    padding-right: 34px; 
}

/* Radio Groups */
.radio-group { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 8px; 
}

.radio-option input[type="radio"] { 
    display: none; 
}

.radio-option label {
    display: inline-block;
    padding: 7px 16px;
    border: 1.5px solid #e0d6d6;
    /* font-family: 'Raleway', sans-serif; */
    font-size: 12.5px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    background: #fdfafa;
}

.radio-option input[type="radio"]:checked + label {
    background: #8b1a1a;
    border-color: #8b1a1a;
    color: #fff;
}

.radio-option label:hover { 
    border-color: #c0392b; 
    color: #8b1a1a; 
}

.radio-option input[type="radio"]:checked + label:hover { 
    color: #fff; 
}

/* reCAPTCHA mock */
.recaptcha-mock {
    border: 1.5px solid #ddd;
    background: #f9f9f9;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    /* font-family: 'Raleway', sans-serif; */
    font-size: 13px;
    color: #444;
}

.recaptcha-mock .rc-check {
    width: 24px; 
    height: 24px;
    border: 2px solid #aaa;
    border-radius: 2px;
    cursor: pointer;
    flex-shrink: 0;
    display: flex; 
    align-items: center; 
    justify-content: center;
    transition: background 0.2s;
}

.recaptcha-mock .rc-check.checked { 
    background: #4caf50; 
    border-color: #4caf50; 
    color: #fff; 
}

.recaptcha-mock .rc-logo { 
    margin-left: auto; 
    text-align: center; 
    font-size: 10px; 
    color: #999; 
}

.recaptcha-mock .rc-logo img { 
    width: 32px; 
    display: block; 
    margin: auto; 
}

/* Send Button */
.adm-footer { 
    padding: 18px 36px 28px; 
    display: flex; 
    align-items: center; 
    gap: 16px; 
    border-top: 1px solid #f0e8e8; 
}

.btn-adm-send {
    background: linear-gradient(135deg, #8b1a1a, #c0392b);
    color: #fff;
    border: none;
    /* font-family: 'Raleway', sans-serif; */
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 13px 40px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-adm-send::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0);
    transition: background 0.2s;
}

.btn-adm-send:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 24px rgba(139,26,26,0.4); 
}

.btn-adm-send:hover::after { 
    background: rgba(255,255,255,0.08); 
}

.adm-privacy {
    /* font-family: 'Raleway', sans-serif; */
    font-size: 11px;
    color: #999;
    line-height: 1.5;
}

/* Arrow Icon */
.arrow-icon {
    padding: 5px !important;
    background-color: black !important;
    color: white;
    border-radius: 50%;
    display: inline;
    align-items: center;
    justify-content: center;
    font-size: 12px !important;
}

/* Admission Form Responsive */
@media (max-width: 576px) {
    .adm-header { padding: 22px 20px 18px; }
    .adm-title { font-size: 1.6rem; }
    .adm-body { padding: 20px 20px 10px; }
    .adm-footer { padding: 14px 20px 22px; flex-direction: column; align-items: flex-start; }
    .arrow-icon { width: 35px; height: 35px; font-size: 16px; }
}



/* ========== SCROLL ANIMATIONS ========== */

/* Base hidden state */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.reveal-left {
    transform: translateX(-60px);
    opacity: 0;
}

.reveal.reveal-right {
    transform: translateX(60px);
    opacity: 0;
}

.reveal.reveal-scale {
    transform: scale(0.85);
    opacity: 0;
}

/* Visible state (when in viewport) */
.reveal.visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Delay classes */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    transition: color 0.3s ease;
}

/* Responsive helpers for about page images */
.about-avatar {
    width: 100%;
    max-width: 250px;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    display: block;
    margin: 0 auto;
}

.about-portrait {
    width: 100%;
    max-width: 250px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
}

@media (max-width: 576px) {
    .about-avatar, .about-portrait { max-width: 140px; }
    /* reduce header padding on small devices to avoid excessive whitespace with fixed navbar */
    .page-header { padding: 24px 0 20px; }
    .content-card { padding: 1.25rem; }
}

/* Extra small devices tweaks */
@media (max-width: 480px) {
    .page-header { padding: 18px 0 14px; }
    .page-header h1 { font-size: 1.5rem; }
    .page-header p { font-size: 1rem; }
    .content-card { padding: 0.9rem; }
    .content-section { padding: 0.5rem 0; }
    .section-text { font-size: 1rem; }
    .about-avatar, .about-portrait { max-width: 110px; }
    .row.align-items-center { gap: 0.5rem; }
    .col-md-8 { margin-top: 0.5rem; }
    .about-avatar { margin-bottom: 0.75rem; }
}

/* Rules & Regulations: improve readability on small devices */
#rules .content-card {
    padding: 1.25rem 1rem;
}

#rules .content-card .row > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

#rules ul {
    padding-left: 1rem;
}

#rules ul li {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
    word-break: break-word;
}

@media (max-width: 576px) {
    /* Force two-column sections to stack cleanly on small devices */
    #rules .col-md-6 { flex: 0 0 100%; max-width: 100%; }
    #rules .col-md-12 { padding-left: 0.5rem; padding-right: 0.5rem; }
    #rules .lead { font-size: 1rem; }
}

/* Stronger wrap/stack rules to handle long list items and small tablets */
#rules {
    -webkit-font-smoothing: antialiased;
}

#rules .content-card {
    overflow-wrap: anywhere;
    word-break: break-word;
}

#rules ul {
    padding-left: 1rem;
    margin-bottom: 0.75rem;
}

#rules ul li {
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 0.45rem;
    word-break: break-word;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 768px) {
    /* ensure stacking across most small devices */
    #rules .col-md-6 { flex: 0 0 100% !important; max-width: 100% !important; }
    #rules .row { gap: 0.5rem; }
    #rules .content-card { padding: 1rem; }
}

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }


@media (min-width: 576px) {
    #laboratories .card-img-top {
        height: 180px !important;
    }
}

@media (min-width: 768px) {
    #laboratories .card-img-top {
        height: 200px !important;
    }
}

@media (min-width: 992px) {
    #laboratories .card-img-top {
        height: 220px !important;
    }
}

