/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #C8102E;
    --secondary-color: #012169;
    --text-dark: #333;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    padding: 1.5rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.tagline {
    color: var(--text-light);
    font-size: 0.9rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    position: relative;
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
    overflow: hidden;
    min-height: 600px;
    display: flex;
    align-items: center;
    /* Fallback background if video doesn't load */
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a3a8a 100%);
}

/* Video Background */
.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Dark overlay for text readability - reduced opacity to show more video */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(1, 33, 105, 0.55) 0%,
        rgba(26, 58, 138, 0.45) 100%
    );
    z-index: 1;
}

/* Hero content above video */
.hero-container {
    position: relative;
    z-index: 2;
}

/* Video control button */
.video-control {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 3;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.video-control:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.video-control-icon {
    color: var(--white);
    font-size: 1.2rem;
    line-height: 1;
}

/* Hide video control on mobile */
@media (max-width: 768px) {
    .video-control {
        display: none;
    }

    .hero-video {
        display: none;
    }

    .hero {
        min-height: auto;
    }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero-description {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 2.5rem;
    line-height: 1.8;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 0.6s backwards;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: #a00d25;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 16, 46, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--secondary-color);
}

/* Statistics Section */
.stats {
    background: var(--bg-light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-light);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Featured Members Section */
.featured {
    background: var(--white);
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.member-card {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 2rem;
    transition: all 0.3s;
}

.member-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
}

.member-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--bg-light);
}

.member-name {
    font-size: 1.4rem;
    color: var(--secondary-color);
    font-weight: 600;
    flex: 1;
}

.member-badge {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.member-details p {
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

.member-details .label {
    font-weight: 600;
    color: var(--text-dark);
}

.member-website a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.member-website a:hover {
    color: var(--secondary-color);
}

/* Features Section */
.features {
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-light);
    line-height: 1.7;
}

/* Portal Access Section */
.portals {
    background: var(--white);
}

.portals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2.5rem;
}

.portal-card {
    background: var(--white);
    border: 2px solid #e0e0e0;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    transition: all 0.3s;
}

.portal-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.portal-admin {
    border-top: 4px solid var(--primary-color);
}

.portal-member {
    border-top: 4px solid var(--secondary-color);
}

.portal-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.portal-title {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.portal-description {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.portal-features {
    list-style: none;
    text-align: left;
    margin-bottom: 1.5rem;
    padding: 0;
}

.portal-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-dark);
}

.portal-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

.portal-note {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 1.5rem;
}

.portal-card .btn {
    width: 100%;
    max-width: 280px;
}

/* API Section */
.api-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
}

.api-description {
    max-width: 700px;
    margin: 0 auto 2rem;
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
}

.api-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

.api-feature {
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    box-shadow: var(--shadow);
}

.api-check {
    color: #28a745;
    margin-right: 0.5rem;
    font-weight: 700;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.footer-tagline {
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .section-title {
        font-size: 2rem;
    }

    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }

    .members-grid,
    .features-grid,
    .portals-grid {
        grid-template-columns: 1fr;
    }

    .portals-grid {
        gap: 1.5rem;
    }

    .portal-card {
        padding: 2rem 1.5rem;
    }
}
