/* Rigel Foundation Career Website Styles */

:root {
    --primary-color: #1a365d;
    --secondary-color: #2d5a87;
    --accent-color: #3182ce;
    --success-color: #38a169;
    --warning-color: #d69e2e;
    --error-color: #e53e3e;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-dark: #2d3748;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --gradient: linear-gradient(135deg, #1a365d 0%, #3182ce 100%);
    --hero-gradient-start: #1a365d;
    --hero-gradient-end: #3182ce;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
}

/* Header and Navigation */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 0;
}

.nav-menu a:hover {
    color: var(--accent-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content */
.main-content {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}

/* When development banner is present - adjust for banner height */
.header:has(.dev-banner) + .main-content {
    margin-top: 110px; /* 70px header + 40px banner */
}

@media (max-width: 768px) {
    .header:has(.dev-banner) + .main-content {
        margin-top: 100px;
    }
}

/* Hero Section */
.hero {
    /* Fallback for older browsers */
    background: #1a365d;
    background-color: #1a365d !important;
    
    /* Modern gradient with vendor prefixes */
    background: -webkit-linear-gradient(135deg, #1a365d 0%, #3182ce 100%);
    background: -moz-linear-gradient(135deg, #1a365d 0%, #3182ce 100%);
    background: -o-linear-gradient(135deg, #1a365d 0%, #3182ce 100%);
    background: -ms-linear-gradient(135deg, #1a365d 0%, #3182ce 100%);
    background: linear-gradient(135deg, #1a365d 0%, #3182ce 100%);
    
    /* Force blue gradient in all browsers */
    background-image: -webkit-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    background-image: -moz-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    background-image: -o-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    background-image: -ms-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    background-image: linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    
    /* Brave browser specific fix */
    background: var(--hero-gradient-start) !important;
    background: -webkit-gradient(linear, left top, right bottom, from(#1a365d), to(#3182ce)) !important;
    
    /* Text color */
    color: #ffffff !important;
    
    /* Layout */
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    
    /* Force hardware acceleration for better rendering */
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    transform: translateZ(0);
    
    /* Background attachment for consistent rendering */
    background-attachment: fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: #ffffff !important;
    color: #1a365d !important;
    border: none !important;
    
    /* Browser-specific fixes */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    
    /* Ensure consistent rendering */
    -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background-color: var(--light-bg) !important;
    background-color: #f8fafc !important;
    color: #1a365d !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    text-decoration: none !important;
}

.btn-outline {
    background-color: transparent !important;
    color: var(--white) !important;
    color: #ffffff !important;
    border: 2px solid var(--white) !important;
    border: 2px solid #ffffff !important;
}

.btn-outline:hover {
    background-color: var(--white) !important;
    background-color: #ffffff !important;
    color: var(--primary-color) !important;
    color: #1a365d !important;
    text-decoration: none !important;
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-success:hover {
    background-color: #2f855a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Programs Section */
.programs {
    padding: 80px 0;
    background: var(--light-bg);
}

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.program-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.program-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.program-header {
    padding: 30px;
    background: var(--gradient);
    color: var(--white);
}

.program-header h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.program-content {
    padding: 30px;
}

.program-content p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.program-features {
    list-style: none;
    margin-bottom: 30px;
}

.program-features li {
    padding: 8px 0;
    color: var(--text-dark);
    position: relative;
    padding-left: 25px;
}

.program-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Forms */
.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
    outline: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 5px;
}

.success {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 5px;
}

/* Cards and Lists */
.card {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.card-header {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.card-header h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background-color: var(--accent-color);
    color: var(--white);
}

.badge-success {
    background-color: var(--success-color);
    color: var(--white);
}

.badge-warning {
    background-color: var(--warning-color);
    color: var(--white);
}

/* Footer */
.footer {
    /* Base background color (always present) */
    background-color: var(--primary-color);
    
    /* Primary background with PNG (GIF when available) */
    background-image: url('../assets/bg-footer.png');
    
    /* Desktop: stretch width, maintain aspect ratio */
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 100% auto;
    
    /* Vendor prefixes for background-size */
    -webkit-background-size: 100% auto;
    -moz-background-size: 100% auto;
    -o-background-size: 100% auto;
    
    /* Ensure minimum coverage */
    min-height: 200px;
    
    /* Text styling */
    color: var(--white);
    
    /* Layout */
    padding: 50px 0 30px;
    position: relative;
    
    /* Ensure content is above background */
    z-index: 1;
}

/* PNG fallback for browsers that don't support GIF or when GIF fails */
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../assets/bg-footer.png');
    background-position: center center;
    background-repeat: no-repeat;
    background-size: 100% auto;
    -webkit-background-size: 100% auto;
    -moz-background-size: 100% auto;
    -o-background-size: 100% auto;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Show PNG fallback when GIF is not available */
.no-gif .footer::before {
    opacity: 1;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--white);
}

/* Footer admin section */
.footer-admin {
    display: flex;
    justify-content: center;
    margin-top: 25px;
    margin-bottom: 10px;
}

/* Admin link styling */
.admin-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-decoration: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.admin-link:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    color: rgba(255, 255, 255, 1) !important;
    text-decoration: none;
}

.admin-icon {
    width: 20px;
    height: 20px;
    opacity: 0.9;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(0) invert(1);
}

.admin-link:hover .admin-icon {
    opacity: 1;
    transform: scale(1.2) rotate(5deg);
    filter: brightness(0) invert(1) drop-shadow(0 0 8px rgba(255, 255, 255, 0.3));
}

/* Hide admin button on mobile and tablets */
@media (max-width: 1024px) {
    .footer-admin {
        display: none;
    }
}

/* Desktop-only refined styling */
@media (min-width: 1025px) {
    .footer-admin {
        margin-top: 30px;
        margin-bottom: 15px;
    }
    
    .admin-link {
        position: relative;
    }
    
    .admin-link::before {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background: linear-gradient(45deg, 
            rgba(255, 255, 255, 0.1), 
            rgba(255, 255, 255, 0.2), 
            rgba(255, 255, 255, 0.1));
        border-radius: 27px;
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
    }
    
    .admin-link:hover::before {
        opacity: 1;
    }
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 1s ease-out;
}

/* Loading Spinner */
.spinner {
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--accent-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 20px 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 15px 0;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .features-grid,
    .programs-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    .container {
        padding: 0 15px;
    }

    .form-container {
        margin: 20px;
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .features,
    .programs {
        padding: 60px 0;
    }

    .feature-card,
    .program-content {
        padding: 25px 20px;
    }
    
    /* Extra small screens - footer background adjustments */
    .footer {
        background-size: auto 100% !important;
        -webkit-background-size: auto 100% !important;
        -moz-background-size: auto 100% !important;
        -o-background-size: auto 100% !important;
        min-height: 120px;
        padding: 30px 0 20px;
    }
    
    .footer::before {
        background-size: auto 100% !important;
        -webkit-background-size: auto 100% !important;
        -moz-background-size: auto 100% !important;
        -o-background-size: auto 100% !important;
    }
}

/* Large screens - ensure full width coverage */
@media (min-width: 1200px) {
    .footer {
        background-size: 100% auto !important;
        -webkit-background-size: 100% auto !important;
        -moz-background-size: 100% auto !important;
        -o-background-size: 100% auto !important;
        min-height: 250px;
    }
    
    .footer::before {
        background-size: 100% auto !important;
        -webkit-background-size: 100% auto !important;
        -moz-background-size: 100% auto !important;
        -o-background-size: 100% auto !important;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none; }
.visible { display: block; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

/* Browser-Specific Compatibility Fixes */

/* Brave Browser Specific Fixes */
@supports (-webkit-appearance: none) {
    .hero {
        background: #1a365d !important;
        background: -webkit-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
        background: linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    }
}

/* Firefox Specific Fixes */
@-moz-document url-prefix() {
    .hero {
        background: #1a365d;
        background: -moz-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    }
}

/* Edge/IE Specific Fixes */
@supports (-ms-ime-align: auto) {
    .hero {
        background: #1a365d;
        background: -ms-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    }
}

/* Safari Specific Fixes */
@supports (-webkit-backdrop-filter: blur(1px)) {
    .hero {
        background: #1a365d !important;
        background: -webkit-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    }
}

/* Additional fallbacks for older browsers */
.no-cssgradients .hero {
    background: #1a365d !important;
}

/* Force blue gradient on specific browsers */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .hero {
        background: -webkit-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    }
}

/* Chromium/Chrome specific */
@supports (background: -webkit-named-image(i)) {
    .hero {
        background: -webkit-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    }
}

/* Prevent ad blockers from interfering with styling */
.hero[style*="background"] {
    background: linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
}

/* ===============================================
   FOOTER BACKGROUND BROWSER COMPATIBILITY FIXES
   =============================================== */

/* Enhanced browser compatibility for footer backgrounds */

/* Firefox - PNG with proper sizing */
@-moz-document url-prefix() {
    .footer {
        background-color: var(--primary-color) !important;
        background-image: url('../assets/bg-footer.png') !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-size: 100% auto !important;
        -moz-background-size: 100% auto !important;
    }
    
    .footer::before {
        background-image: url('../assets/bg-footer.png') !important;
        background-size: 100% auto !important;
    }
}

/* Safari/Webkit - PNG with proper sizing */
@supports (-webkit-backdrop-filter: blur(1px)) {
    .footer {
        background-image: url('../assets/bg-footer.png') !important;
        background-size: 100% auto !important;
        -webkit-background-size: 100% auto !important;
    }
}

/* Chrome/Edge - Modern browsers with PNG */
@supports (background-image: image-set(url('../assets/bg-footer.png') 1x)) {
    .footer {
        background-image: url('../assets/bg-footer.png') !important;
        background-size: 100% auto !important;
    }
}

/* Fallback for older browsers */
.no-backgroundsize .footer {
    background: var(--primary-color) url('../assets/bg-footer.png') center center no-repeat !important;
}

/* Mobile optimization - stretch height, maintain aspect ratio */
@media (max-width: 768px) {
    .footer {
        background-image: url('../assets/bg-footer.png') !important;
        
        /* Mobile: stretch height, maintain aspect ratio */
        background-size: auto 100% !important;
        -webkit-background-size: auto 100% !important;
        -moz-background-size: auto 100% !important;
        -o-background-size: auto 100% !important;
        
        /* Ensure proper coverage on mobile */
        background-position: center center !important;
        min-height: 150px;
    }
    
    .footer::before {
        display: none;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), 
       (min-resolution: 192dpi), 
       (min-resolution: 2dppx) {
    .footer {
        background-image: url('../assets/bg-footer.gif') !important;
    }
}

/* Print styles */
@media print {
    .footer {
        background-image: none !important;
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
    
    .footer::before {
        display: none !important;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .footer::before {
        transition: none !important;
    }
}

/* ===============================================
   COMPREHENSIVE CROSS-BROWSER COMPATIBILITY
   =============================================== */

/* Normalize box-sizing across all browsers */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
}

/* Smooth scrolling with fallbacks */
html {
    scroll-behavior: smooth;
    -webkit-scroll-behavior: smooth;
    -moz-scroll-behavior: smooth;
    -ms-scroll-behavior: smooth;
}

/* Text rendering optimizations */
body {
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Focus outline for better accessibility */
*:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
*:focus:not(:focus-visible) {
    outline: none;
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
    -ms-interpolation-mode: bicubic; /* IE */
}

/* Form element consistency */
input, select, textarea, button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Button focus and active states */
button, .btn {
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

/* Prevent horizontal scrolling */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Grid and flexbox fallbacks */
@supports not (display: grid) {
    .features-grid,
    .programs-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 20px;
    }
    
    .feature-card,
    .program-card {
        flex: 1 1 300px;
    }
}

@supports not (display: flex) {
    .features-grid,
    .programs-grid {
        display: table;
        width: 100%;
    }
    
    .feature-card,
    .program-card {
        display: table-cell;
        width: 33.33%;
        vertical-align: top;
    }
}

/* ===============================================
   ENHANCED ANIMATIONS & INTERACTIONS
   =============================================== */

/* Enhanced fade-in animations */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
        -webkit-transform: translate3d(0, 40px, 0);
        -moz-transform: translate3d(0, 40px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
        -webkit-transform: translate3d(0, 0, 0);
        -moz-transform: translate3d(0, 0, 0);
    }
}

@-webkit-keyframes fadeInUp {
    0% {
        opacity: 0;
        -webkit-transform: translate3d(0, 40px, 0);
    }
    100% {
        opacity: 1;
        -webkit-transform: translate3d(0, 0, 0);
    }
}

@-moz-keyframes fadeInUp {
    0% {
        opacity: 0;
        -moz-transform: translate3d(0, 40px, 0);
    }
    100% {
        opacity: 1;
        -moz-transform: translate3d(0, 0, 0);
    }
}

/* Apply consistent animations to elements */
.feature-card,
.program-card,
.card {
    animation: fadeInUp 0.8s ease-out forwards;
    -webkit-animation: fadeInUp 0.8s ease-out forwards;
    -moz-animation: fadeInUp 0.8s ease-out forwards;
    -o-animation: fadeInUp 0.8s ease-out forwards;
    
    /* Initial state */
    opacity: 0;
    transform: translate3d(0, 40px, 0);
    -webkit-transform: translate3d(0, 40px, 0);
    -moz-transform: translate3d(0, 40px, 0);
}

/* Staggered animation delays for visual appeal */
.features-grid .feature-card:nth-child(1),
.programs-grid .program-card:nth-child(1) { 
    animation-delay: 0.1s; 
    -webkit-animation-delay: 0.1s;
    -moz-animation-delay: 0.1s;
}
.features-grid .feature-card:nth-child(2),
.programs-grid .program-card:nth-child(2) { 
    animation-delay: 0.2s; 
    -webkit-animation-delay: 0.2s;
    -moz-animation-delay: 0.2s;
}
.features-grid .feature-card:nth-child(3),
.programs-grid .program-card:nth-child(3) { 
    animation-delay: 0.3s; 
    -webkit-animation-delay: 0.3s;
    -moz-animation-delay: 0.3s;
}
.features-grid .feature-card:nth-child(4) { 
    animation-delay: 0.4s; 
    -webkit-animation-delay: 0.4s;
    -moz-animation-delay: 0.4s;
}
.features-grid .feature-card:nth-child(5) { 
    animation-delay: 0.5s; 
    -webkit-animation-delay: 0.5s;
    -moz-animation-delay: 0.5s;
}
.features-grid .feature-card:nth-child(6) { 
    animation-delay: 0.6s; 
    -webkit-animation-delay: 0.6s;
    -moz-animation-delay: 0.6s;
}

/* Hero content animations */
.hero-content h1 {
    animation: fadeInUp 1s ease-out 0.3s forwards;
    -webkit-animation: fadeInUp 1s ease-out 0.3s forwards;
    -moz-animation: fadeInUp 1s ease-out 0.3s forwards;
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    -webkit-transform: translate3d(0, 30px, 0);
    -moz-transform: translate3d(0, 30px, 0);
}

.hero-content p {
    animation: fadeInUp 1s ease-out 0.5s forwards;
    -webkit-animation: fadeInUp 1s ease-out 0.5s forwards;
    -moz-animation: fadeInUp 1s ease-out 0.5s forwards;
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    -webkit-transform: translate3d(0, 30px, 0);
    -moz-transform: translate3d(0, 30px, 0);
}

.hero-content .cta-buttons {
    animation: fadeInUp 1s ease-out 0.7s forwards;
    -webkit-animation: fadeInUp 1s ease-out 0.7s forwards;
    -moz-animation: fadeInUp 1s ease-out 0.7s forwards;
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    -webkit-transform: translate3d(0, 30px, 0);
    -moz-transform: translate3d(0, 30px, 0);
}

/* Section headers animation */
.section-header {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
    -webkit-animation: fadeInUp 0.8s ease-out 0.2s forwards;
    -moz-animation: fadeInUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
    transform: translate3d(0, 30px, 0);
    -webkit-transform: translate3d(0, 30px, 0);
    -moz-transform: translate3d(0, 30px, 0);
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
        -webkit-animation-duration: 0.01ms !important;
        -moz-animation-duration: 0.01ms !important;
        -webkit-transition-duration: 0.01ms !important;
        -moz-transition-duration: 0.01ms !important;
    }
    
    .feature-card,
    .program-card,
    .card,
    .hero-content *,
    .section-header {
        opacity: 1 !important;
        transform: none !important;
        -webkit-transform: none !important;
        -moz-transform: none !important;
    }
}

/* ===============================================
   ADDITIONAL BROWSER-SPECIFIC FIXES
   =============================================== */

/* Internet Explorer and Edge specific fixes */
@supports (-ms-ime-align: auto) {
    .features-grid,
    .programs-grid {
        display: -ms-grid;
        -ms-grid-columns: 1fr 1fr 1fr;
        -ms-grid-rows: auto;
    }
    
    .feature-card:nth-child(1) { -ms-grid-column: 1; }
    .feature-card:nth-child(2) { -ms-grid-column: 2; }
    .feature-card:nth-child(3) { -ms-grid-column: 3; }
    
    .program-card:nth-child(1) { -ms-grid-column: 1; }
    .program-card:nth-child(2) { -ms-grid-column: 2; }
    .program-card:nth-child(3) { -ms-grid-column: 3; }
}

/* Safari-specific fixes */
@supports (-webkit-appearance: none) {
    .navbar {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
    
    .admin-link {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

/* Firefox-specific fixes */
@-moz-document url-prefix() {
    .gradient {
        background: -moz-linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    }
    
    .hero {
        background: -moz-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    }
}

/* Chrome and Chromium-based browsers */
@supports (background: -webkit-named-image(i)) {
    .hero {
        background: -webkit-linear-gradient(135deg, #1a365d 0%, #3182ce 100%) !important;
    }
    
    .navbar {
        will-change: transform;
    }
    
    .feature-card,
    .program-card {
        will-change: transform, opacity;
    }
}

@media (max-width: 768px) {
    .programs-grid {
        grid-template-columns: 1fr !important;
    }
}

.testimonial-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-fallback {
    width: 55px;
    height: 55px;
    background: var(--gradient);
    color: white;
    font-weight: bold;
    font-size: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.testimonials-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 30px;
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr !important;
    }
}

.testimonials-grid .program-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonials-grid .program-content {
    flex-grow: 1;
}


/* ============================= */
/* Rigel Internship Section Only */
/* ============================= */

.rigel-internships-section {
  padding: 80px 20px;
  background: #f8fafc;
  font-family: "Poppins", sans-serif;
}

.rigel-wrapper {
  max-width: 1200px;
  margin: auto;
}

.rigel-heading {
  text-align: center;
  margin-bottom: 50px;
}

.rigel-heading h2 {
  font-size: 2.4rem;
  font-weight: 700;
  color: #0f172a;
}

.rigel-heading p {
  font-size: 1.05rem;
  max-width: 750px;
  margin: 15px auto;
  color: #475569;
  line-height: 1.6;
}

/* Grid 2×2 Layout */
.rigel-internship-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 35px;
}

/* Internship Card */
.rigel-card {
  background: #ffffff;
  border-radius: 18px;
  padding: 35px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: 0.3s ease;
}

.rigel-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
}

/* Icon */
.rigel-icon {
  width: 65px;
  height: 65px;
  background: #1e3a8a;
  color: white;
  font-size: 1.8rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

/* Card Title */
.rigel-card h3 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #0f172a;
}

/* Paragraph */
.rigel-card p {
  font-size: 1rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 18px;
}

/* List */
.rigel-card ul {
  padding-left: 18px;
  margin-bottom: 22px;
}

.rigel-card ul li {
  margin-bottom: 10px;
  font-size: 0.96rem;
  color: #334155;
}

/* Button */
.rigel-btn {
  display: inline-block;
  padding: 12px 22px;
  background: #1e3a8a;
  color: white;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: 0.3s;
}

.rigel-btn:hover {
  background: #0f172a;
}

/* Responsive */
@media (max-width: 900px) {
  .rigel-internship-grid {
    grid-template-columns: 1fr;
  }
}




/* ============================================
   Feedback Page Extra Styling
============================================ */

.feedback-cta h2 {
  font-size: 2.1rem;
  font-weight: 800;
  margin-bottom: 15px;
}

.feedback-cta p {
  font-size: 1.1rem;
  max-width: 650px;
  margin: auto;
  line-height: 1.7;
}

.feedback-cta a {
  margin-top: 20px;
}


/* particular internships pages CSS */

/* ============================================
   Internship Program Page Template (Reusable)
   Rigel Foundation Brochure Theme
============================================ */

/* Page Wrapper */
.internship-page {
  background: #ffffff;
  font-family: "Times New Roman", serif;
  padding: 60px 0;
}

/* Container */
.container {
  max-width: 1050px;
  margin: auto;
  padding: 0 20px;
}

/* ============================================
   SECTION 1: INTRO
============================================ */

.internship-intro {
  padding-top: 40px;
  padding-bottom: 60px;
}


/* Main Page Heading */


/* Internship Name (Centered + Prominent) */
.program-title {
  font-size: 2.4rem;          /* bigger title */
  font-weight: 800;
  margin-bottom: 25px;
  color: #0f172a;

  text-align: center;         /* center heading */
}

/* Description Paragraph (Centered Block) */
.program-description {
  font-size: 1.15rem;
  line-height: 1.9;
  color: #111827;

  max-width: 850px;           /* tighter width for readability */
  margin: 0 auto;             /* centers the paragraph block */

  text-align: center;         /* center text */
}


/* Buttons Container */
.program-actions {
  margin-top: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px; /* space between buttons */
}

.program-actions a {
  min-width: 220px;       /* equal button length */
  text-align: center;     /* text centered */
  padding: 14px 0;        /* equal height */
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 600;
}

@media (max-width: 768px) {
  .program-actions {
    flex-direction: column;
  }

  .program-actions a {
    width: 100%;
    max-width: 320px;
  }
}


/* ============================================
   Internship Back Link Button (Independent)
============================================ */

.internship-back-link {
  display: inline-block;
  padding: 13px 34px;
  border-radius: 10px;

  font-size: 1.05rem;
  font-weight: 600;
  text-decoration: none;

  background: white;
  border: 2px solid #1d4ed8;
  color: #1d4ed8;

  transition: 0.25s ease;
}

.internship-back-link:hover {
  background: #1d4ed8;
  color: white;
}


/* Apply Button */
.apply-btn {
  background: #1d4ed8;
  border: 2px solid #1d4ed8;
  color: #ffffff;
}

.apply-btn:hover {
  opacity: 0.9;
}

/* ============================================
   SECTION 2: OUTCOMES + BENEFITS
============================================ */

.internship-highlights {
  margin-bottom: 20px;
}

/* Two Column Layout */
.two-column-layout {
  display: flex;
  justify-content: space-between;
  gap: 70px;
}

/* Each Column */
.highlight-box {
  flex: 1;
}

/* Titles */
.highlight-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-bottom: 20px;
  color: #0f172a;
}

/* Ordered List */
.highlight-list {
  padding-left: 22px;
  margin: 0;
}

.highlight-list li {
  font-size: 1.08rem;
  margin-bottom: 12px;
  line-height: 1.7;
  color: #1e293b;
}

/* ============================================
   SECTION 3: COURSE FEES (Like Brochure)
============================================ */

.internship-fees {
  padding-top: 20px;
  text-align: center;
}

/* Fees Card */
.fees-card {
  max-width: 750px;
  margin: auto;
  padding-top: 20px;
  border-top: 2px solid #cbd5e1;
}

/* Fees Title */
.fees-title {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 10px;
  color: #0f172a;
}

/* Fees Info Text */
.fees-info {
  font-size: 1.15rem;
  line-height: 2;
  color: #1e293b;
}

/* Red Highlight */
.fees-note {
  display: block;
  margin-top: 10px;
  font-size: 1.15rem;
  font-weight: bold;
  color: red;
}

/* Fees Button */
.fees-btn {
  margin-top: 40px;
  border: 2px solid #1d4ed8;
  background: #ffffff;
  color: #1d4ed8;
}

.fees-btn:hover {
  background: #1d4ed8;
  color: #ffffff;
}

/* ============================================
   RESPONSIVE DESIGN
============================================ */

@media (max-width: 768px) {

  /* Stack Columns */
  .two-column-layout {
    flex-direction: column;
    gap: 45px;
  }

  /* Full Width Buttons */
  .back-btn,
  .apply-btn,
  .fees-btn {
    width: 100%;
    text-align: center;
    margin: 12px 0;
  }

  /* Reduce Font Slightly */
  .program-description {
    font-size: 1.05rem;
  }
}
