* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0f3460;
    --secondary-color: #16c784;
    --accent-color: #ea3c53;
    --text-dark: #1a1a1a;
    --text-light: #666666;
    --bg-light: #f5f7fa;
    --bg-white: #ffffff;
    --border-color: #e0e6ed;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Navigation */
nav {
    background-color: var(--primary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--secondary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* Mobile Hamburger */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: var(--bg-white);
    font-size: 1.25rem;
    cursor: pointer;
}

.nav-menu.open {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.nav-menu a {
    color: var(--bg-white);
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover {
    color: var(--secondary-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Gentle vertical rhythm inside main container */
.container > * + * {
    margin-top: 1.25rem;
}

/* Hover & animation utilities */
a, button, .cta-button, .team-card, .about-content, .social-link {
    transition: transform 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
    will-change: transform, opacity;
}

a:hover, .cta-button:hover {
    transform: translateY(-4px);
}

.team-card:hover { transform: translateY(-8px); box-shadow: 0 12px 30px rgba(0,0,0,0.12); }

.about-content:hover { transform: translateY(-4px); }

/* Preloader */
#preloader {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, rgba(15,52,96,0.95), rgba(15,52,96,0.9));
    z-index: 99999;
    flex-direction: column;
    gap: 1rem;
    color: #fff;
    transition: opacity 420ms ease, visibility 420ms;
}

#preloader img { width: 96px; height: 96px; border-radius: 12px; object-fit: cover; box-shadow: 0 8px 30px rgba(0,0,0,0.3); }

#preloader .spinner {
    width: 48px; height: 48px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.12); border-top-color: #16c784; animation: spin 1s linear infinite;
}

#preloader.loaded { opacity: 0; visibility: hidden; pointer-events: none; }

@keyframes spin { to { transform: rotate(360deg); } }


/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a5e8e 100%);
    color: var(--bg-white);
    padding: 6rem 2rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: slideInDown 0.8s ease;
}

.hero .tagline {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: slideInUp 0.8s ease;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--bg-white);
    padding: 0.8rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--secondary-color);
}

.cta-button:hover {
    background-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 199, 132, 0.4);
}

.cta-button.secondary {
    background-color: transparent;
    border-color: var(--bg-white);
}

.cta-button.secondary:hover {
    background-color: var(--bg-white);
    color: var(--primary-color);
}

/* Main Content */
main {
    min-height: 70vh;
    padding: 4rem 0;
}

section {
    margin-bottom: 4rem;
}

/* Sections */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-header .divider {
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    margin: 1rem auto;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* About Section */
.about-content {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    line-height: 1.8;
}

.about-content h3 {
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
    font-size: 1.3rem;
}

.about-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.about-content li {
    margin-bottom: 0.8rem;
    color: var(--text-light);
}

.highlight {
    color: var(--secondary-color);
    font-weight: 600;
}

.family-quote {
    text-align: center;
    font-size: 1.5rem;
    font-style: italic;
    color: var(--secondary-color);
    margin-top: 3rem;
    padding: 2rem;
    border-left: 4px solid var(--secondary-color);
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.team-card {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.team-card h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.team-card .role {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.team-card .location {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Contact & Signup Form */
.signup-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    padding: 2rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(22, 199, 132, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

/* Departments Grid */
.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.department-category {
    background-color: var(--bg-white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--text-dark);
    font-weight: normal;
    transition: color 0.3s ease;
}

.checkbox-group label:hover {
    color: var(--secondary-color);
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.8rem;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

.checkbox-group input[type="checkbox"]:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Form Validation Styles */
.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown) {
    border-color: var(--accent-color);
}

.form-group input:valid:not(:placeholder-shown),
.form-group select:valid:not(:placeholder-shown) {
    border-color: var(--secondary-color);
}

/* Success Message */
.form-success-message {
    background-color: #d4edda;
    border: 2px solid var(--secondary-color);
    color: #155724;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInDown 0.5s ease;
}

.form-error-message {
    background-color: #f8d7da;
    border: 2px solid var(--accent-color);
    color: #721c24;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: slideInDown 0.5s ease;
}

/* Responsive Form */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .departments-grid {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 1.5rem;
    }

    .cta-button {
        width: 100%;
    }

    .form-section {
        padding: 1.5rem;
    }
}

/* Contact & Signup Form */
.contact-container {
    background-color: var(--bg-white);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.contact-intro {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-light);
}

.form-container {
    margin-bottom: 3rem;
}

.form-container iframe {
    width: 100%;
    border-radius: 8px;
    border: none;
}

.contact-email {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 2rem;
}

.contact-email h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-email a {
    color: var(--secondary-color);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 600;
}

.contact-email a:hover {
    text-decoration: underline;
}

/* Social Media Section */
.social-section {
    margin-top: 3rem;
}

.social-section h3 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--bg-white);
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

.social-icon-text {
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-link:hover {
    background-color: var(--secondary-color);
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 4px 12px rgba(22, 199, 132, 0.4);
}

.social-link.linkedin {
    background-color: #0a66c2;
}

.social-link.instagram {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.social-link.discord {
    background-color: #5865f2;
}

.social-link.telegram {
    background-color: #0088cc;
}

.social-link.facebook {
    background-color: #1877f2;
}

.social-link.x {
    background-color: #000000;
}

.social-link.reddit {
    background-color: #ff4500;
}

.social-link.medium {
    background-color: #000000;
}

.social-link.threads {
    background-color: #000000;
}

.social-link.snapchat {
    background-color: #FFFC00;
    color: #000;
}

.social-link.snapchat:hover {
    background-color: #FFE820;
    color: #000;
}

.social-link.pinterest {
    background-color: #e60023;
}

.social-link.quora {
    background-color: #b92b27;
}

.social-link.hellotalk {
    background-color: #00B4FF;
}

.social-link.arattai {
    background-color: #FF6B6B;
}

.social-link.explurger {
    background-color: #FF6B35;
}

.social-link.imo {
    background-color: #7B68EE;
}

.social-link.messenger {
    background-color: #0084FF;
}

/* Modal Styles */
.qr-modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.qr-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-modal-content {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.qr-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-modal-close:hover {
    background-color: #d63243;
    transform: scale(1.1);
}

.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.qr-code-box {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-code-box canvas {
    max-width: 250px;
    height: auto;
}

.qr-header {
    font-size: 1.3rem;
    color: var(--primary-color);
    font-weight: 600;
    text-align: center;
    word-break: break-word;
    line-height: 1.6;
}

.view-all-qr-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1.5rem;
    font-weight: 600;
}

.view-all-qr-btn:hover {
    background-color: #13a366;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(22, 199, 132, 0.3);
}

/* All QR Codes Modal */
.all-qr-modal-content {
    background-color: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    position: relative;
    max-width: 800px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.all-qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--bg-light);
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.qr-item:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 4px 12px rgba(22, 199, 132, 0.2);
}

.qr-item canvas {
    width: 150px;
    height: 150px;
}

.qr-item-name {
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    font-size: 0.9rem;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Video loader styles */
.video-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 12px;
    z-index: 40;
    background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.7));
    color: #fff;
    text-align: center;
    padding: 1.5rem;
}
.video-loader .logo { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; box-shadow: 0 8px 30px rgba(0,0,0,0.4); }
.video-loader .title { font-weight: 700; font-size: 1.05rem; }
.video-loader .subtitle { font-size: 0.9rem; color: rgba(255,255,255,0.85); }
.video-loader .loader-bar { width: 220px; height: 8px; background: rgba(255,255,255,0.12); border-radius: 999px; overflow: hidden; }
.video-loader .loader-bar > i { display: block; height: 100%; width: 30%; background: linear-gradient(90deg, rgba(22,199,132,0.9), rgba(234,60,83,0.9)); border-radius: 999px; transform: translateX(-40%); animation: slide 1.4s linear infinite; }
@keyframes slide { to { transform: translateX(140%); } }
.video-offline { position: absolute; inset: 0; z-index: 45; display: none; align-items: center; justify-content: center; background: rgba(20,20,20,0.85); color: #fff; flex-direction: column; gap: 12px; }
.video-offline .btn { background: var(--secondary-color); color: #fff; padding: 0.6rem 1rem; border-radius: 6px; text-decoration: none; }
.video-offline.active { display: flex; }
.player-wrapper .hidden { display: none !important; }

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--bg-white);
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

footer p {
    margin: 0.5rem 0;
}

/* Animations */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Consolidated Mobile Styles (max-width: 768px) */
@media (max-width: 768px) {
    /* Navigation on mobile */
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
    .nav-menu { display: none; position: absolute; top: 64px; right: 2rem; background: var(--primary-color); padding: 1rem 1.5rem; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.12); z-index: 100; list-style: none; }
    .nav-menu li { margin: 0; }
    .nav-menu a { display: block; padding: 0.5rem 0; color: var(--bg-white); text-decoration: none; }
    .nav-menu.open { display: flex !important; flex-direction: column; gap: 1rem; }

    /* Hero and Typography */
    .hero h1 { font-size: 2rem; }
    .hero .tagline { font-size: 1rem; }

    /* Forms */
    .form-row { grid-template-columns: 1fr; }
    .departments-grid { grid-template-columns: 1fr; }
    .form-section { padding: 1.5rem; }

    /* CTA buttons */
    .cta-group { display: flex; flex-direction: column; gap: 0.75rem; }
    .cta-group .cta-button { width: 100%; }
    .cta-button { padding: 0.6rem 1.5rem; font-size: 0.9rem; }

    /* Sections */
    .section-header h2 { font-size: 1.8rem; }
    .team-grid { grid-template-columns: 1fr; }
    .social-links { gap: 1rem; }
    .family-quote { font-size: 1.2rem; }

    /* Modals */
    .qr-modal-content { max-width: 90%; }
    .all-qr-modal-content { max-width: 95%; }
    .all-qr-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1.5rem; }
}

/* Extra small screens (max-width: 480px) */
@media (max-width: 480px) {
    .hero { padding: 3rem 1rem; }
    .container { padding: 0 1rem; }
    .hero h1 { font-size: 1.5rem; }
}




.video-box {
  text-align: center;
  margin: 40px 0;
}

.video-main-btn {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.4s ease;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.video-main-btn:hover {
  transform: translateY(-2px);
}

.video-container {
  max-width: 850px;
  margin: 20px auto 0;
  background: white;
  border-radius: 18px;
  box-shadow: 0 25px 50px rgba(0,0,0,0.18);
  overflow: hidden;
  max-height: 0;
  transition: all 0.6s ease;
  opacity: 0;
}

.video-container.open {
  max-height: 900px;
  opacity: 1;
  padding: 25px;
}

.video-top {
  text-align: left;
  margin-bottom: 15px;
}

.video-back {
  background: #f1f3f7;
  border: none;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s ease;
}

.video-back:hover {
  background: var(--secondary-color);
  color: white;
}

.video-lang {
  margin-bottom: 20px;
  transition: 0.4s ease;
}

.video-lang button {
  border: none;
  padding: 10px 22px;
  border-radius: 999px;
  margin: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: 0.3s ease;
}

.video-lang button:first-child {
  background: var(--secondary-color);
  color: white;
}

.video-lang button:last-child {
  background: #eef2f7;
}

.video-lang button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

.video-frame-wrap {
  max-height: 0;
  overflow: hidden;
  transition: 0.6s ease;
}

.video-frame-wrap.show {
  max-height: 600px;
}

.video-frame-wrap iframe {
  width: 100%;
  aspect-ratio: 16/9;
  border: none;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.2);
}
