:root {
    --brand-navy: #071A3D;
    --brand-green: #087A46;
    --brand-green-dark: #056238;
    --brand-gold: #F5A300;
    --primary: var(--brand-navy);
    --primary-light: #123E68;
    --primary-glow: rgba(7, 26, 61, 0.14);
    --accent: var(--brand-green);
    --accent-light: #0B9255;
    --accent-glow: rgba(8, 122, 70, 0.16);
    --secondary: var(--brand-gold);
    --secondary-light: #FFB52E;
    --secondary-glow: rgba(245, 163, 0, 0.16);
    --bg: #FFFFFF;
    --nav-bg: rgba(255, 255, 255, 0.96);
    --panel: #F5F7FA;
    --panel-card: #FFFFFF;
    --border: #E2E8F0;
    --border-hover: #CBD5E1;
    --text: #1E293B;
    --text-muted: #64748B;
    --error: #EF4444;
    --success: var(--brand-green);
    --font-heading: ui-rounded, 'Segoe UI', Arial, sans-serif;
    --font-body: 'Segoe UI', Arial, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg: #07111F;
    --panel: #0E1D2F;
    --panel-card: #11243A;
    --border: #294059;
    --border-hover: #3A5876;
    --text: #F8FAFC;
    --text-muted: #94A3B8;
    --nav-bg: rgba(7, 17, 31, 0.96);
    --primary: #9BC4EE;
    --primary-light: #76A9DC;
    --accent: #4ADE80;
    --accent-light: #22C55E;
    --secondary: #FBBF24;
    --secondary-light: #FCD34D;
    --success: #4ADE80;
    --primary-glow: rgba(32, 77, 126, 0.42);
    --accent-glow: rgba(8, 122, 70, 0.38);
    --secondary-glow: rgba(245, 163, 0, 0.34);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    transition: var(--transition);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Accessibility: Focus states */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    color: var(--primary);
}

a {
    color: inherit;
    text-decoration: none;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--panel);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 5%;
    border-bottom: 1px solid var(--border);
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.logo,
.brand-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.brand-logo {
    position: relative;
    width: clamp(184px, 16vw, 216px);
    height: 58px;
    overflow: hidden;
    border-radius: 10px;
    transition: var(--transition);
}

.brand-logo:hover {
    transform: translateY(-1px);
}

.brand-logo-image {
    display: block;
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: auto;
    transform: translateY(-50%);
}

.brand-logo--sidebar {
    width: 205px;
    height: 56px;
}

.brand-logo--compact {
    width: 164px;
    height: 46px;
}

.brand-logo--footer {
    width: 210px;
    height: 58px;
}

.brand-logo--auth {
    display: flex;
    width: 216px;
    margin: 0 auto 1.5rem;
}

.brand-context {
    display: block;
    margin-top: 0.45rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

[data-theme="dark"] .brand-logo {
    background: #FFFFFF;
}

.nav-links {
    display: flex;
    gap: clamp(0.75rem, 1.35vw, 1.5rem);
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.theme-toggle {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    margin-left: 0.5rem;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
    z-index: 1001;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-family: var(--font-heading);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(8, 122, 70, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--panel);
}

.btn-accent {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    color: var(--primary);
    box-shadow: 0 4px 15px var(--secondary-glow);
}

.btn-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 163, 0, 0.28);
}

/* Hero Section with Interactive Slider */
.hero {
    min-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 5%;
    position: relative;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slider .slide.active {
    opacity: 1;
}

.slider-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(7, 26, 61, 0.88) 0%, rgba(4, 65, 41, 0.9) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 900px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-badge {
    background: rgba(8, 122, 70, 0.26);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #FFFFFF;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 3.8rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: #FFFFFF; /* High contrast white over dark slider overlay */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 650px;
    margin-bottom: 2.5rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.hero-actions {
    display: flex;
    gap: 1rem;
}

/* Slider dot indicators */
.slider-dots {
    position: absolute;
    bottom: 2rem;
    display: flex;
    gap: 0.75rem;
    z-index: 4;
}

.slider-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
}

.slider-dot.active {
    background: var(--secondary);
    transform: scale(1.3);
}

.slider-dot:focus-visible { outline-color: #FFFFFF; outline-offset: 5px; }

.partners-section { padding-top: 3.2rem; padding-bottom: 1.5rem; }
.partner-slider-controls { display: flex; align-items: center; gap: 0.8rem; margin-top: 1.5rem; }
.partner-slider { display: flex; gap: 1rem; width: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: thin; padding: 0.5rem 0 1rem; }
.partner-card { flex: 0 0 clamp(170px, 23vw, 260px); min-height: 116px; display: flex; align-items: center; justify-content: center; padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-card); scroll-snap-align: start; color: var(--primary); text-align: center; overflow-wrap: anywhere; }
.partner-card img { display: block; max-width: 100%; max-height: 78px; object-fit: contain; }
.partner-card:hover { border-color: var(--accent); box-shadow: 0 6px 20px var(--accent-glow); }
.partner-slider-arrow { flex: none; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 50%; background: var(--panel-card); color: var(--primary); font: 700 1.7rem/1 var(--font-body); cursor: pointer; }
.partner-slider-arrow:hover { border-color: var(--accent); color: var(--accent); }
.partner-slider-arrow[hidden] { display: none; }
.partners-empty { max-width: 680px; margin: 1.5rem auto 0; padding: 1.2rem; border: 1px dashed var(--border); border-radius: 12px; color: var(--text-muted); text-align: center; }

.partner-admin-form { margin-top: 1rem; }
.partner-admin-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem 1rem; }
.partner-admin-fields .form-group { min-width: 0; }
.partner-admin-fields label { display: block; margin-bottom: 0.25rem; font-weight: 650; }
.partner-admin-fields input { width: 100%; min-height: 42px; padding: 0.55rem 0.7rem; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-card); color: var(--text); font: inherit; }
.partner-admin-fields input[type="file"] { padding: 0.45rem; }
.partner-admin-list { display: grid; gap: 1rem; margin-top: 1rem; }
.partner-admin-item { padding: 1rem; border: 1px solid var(--border); border-radius: 12px; background: var(--panel-card); }
.partner-admin-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem; }
.partner-admin-heading img { width: 90px; height: 52px; object-fit: contain; }
.partner-admin-item > form:last-child { margin-top: 0.7rem; }

@media (max-width: 700px) {
    .partner-admin-fields { grid-template-columns: 1fr; }
    .partner-slider-controls { gap: 0.3rem; }
    .partner-card { flex-basis: min(72vw, 250px); }
    .partner-slider-arrow { width: 34px; height: 34px; }
}

/* Tiers Section */
.section {
    padding: 6rem 5%;
    max-width: 1300px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.tier-card {
    background: var(--panel-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.tier-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--border);
}

.tier-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(15, 76, 129, 0.08);
}

.tier-card.featured {
    border-color: var(--secondary);
    box-shadow: 0 4px 20px var(--secondary-glow);
}

.tier-card.featured::before {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.tier-badge {
    position: absolute;
    top: 1.5rem;
    right: -2rem;
    background: var(--secondary);
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.25rem 2rem;
    transform: rotate(45deg);
    text-transform: uppercase;
}

.tier-name {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.tier-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.tier-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

.tier-value {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.tier-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

/* Core Pillars & Info */
.pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
}

.pillar-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    transition: var(--transition);
}

.pillar-card:hover {
    border-color: var(--primary);
    background: var(--panel-card);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.pillar-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.pillar-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--primary);
}

.pillar-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Forms & Authentication Layout */
.auth-container {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 5%;
    background: radial-gradient(circle at bottom, var(--primary-glow) 0%, transparent 60%);
}

.auth-card {
    background: var(--panel-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    animation: fadeIn 0.5s ease;
}

.auth-card-wide {
    max-width: 700px;
}

.auth-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.auth-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.auth-header p {
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text);
}

input, select, textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    background: var(--panel-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--error);
}

.alert-success {
    background: rgba(8, 122, 70, 0.08);
    border-color: rgba(8, 122, 70, 0.2);
    color: var(--success);
}

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-footer a {
    color: var(--primary);
    font-weight: 600;
}

/* User & Admin Dashboard Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    background: var(--panel);
}

.sidebar {
    background: var(--panel-card);
    border-right: 1px solid var(--border);
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 3rem;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    color: var(--text-muted);
}

.sidebar-link:hover, .sidebar-link.active {
    background: rgba(8, 122, 70, 0.08);
    color: var(--accent);
    box-shadow: inset 3px 0 0 var(--accent);
}

.sidebar-footer {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
}

.mobile-dashboard-header {
    display: none;
}

.main-content {
    padding: 3rem 5%;
    overflow-y: auto;
    background: var(--panel);
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.welcome-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.welcome-header h1 {
    font-size: 2.2rem;
    color: var(--primary);
}

/* Stats Overview */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.75rem;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary);
    background: var(--panel-card);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.stat-title {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

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

.stat-detail {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    color: var(--accent);
    font-weight: 600;
}

/* Progress Section */
.progress-container {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 3rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.progress-header h3 {
    color: var(--primary);
}

.progress-bar-bg {
    background: var(--panel-card);
    height: 16px;
    border-radius: 10px;
    width: 100%;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border);
}

.progress-bar-fill {
    background: linear-gradient(90deg, var(--accent), var(--secondary));
    height: 100%;
    border-radius: 10px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 10px var(--primary-glow);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Dashboard Columns */
.dashboard-columns {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
}

.card {
    background: var(--panel-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.01);
}

.card h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    color: var(--primary);
}

/* Interactive Calculator & Countdown */
.countdown-box {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.countdown-unit {
    background: var(--panel);
    border: 1px solid var(--border);
    padding: 0.75rem;
    border-radius: 8px;
    flex: 1;
    text-align: center;
}

.countdown-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
}

.countdown-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* Data Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary);
    background: var(--panel);
}

tr:hover td {
    background: var(--panel);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-active { background: rgba(8, 122, 70, 0.1); color: var(--accent); border: 1px solid rgba(8, 122, 70, 0.2); }
.badge-pending { background: rgba(245, 158, 11, 0.1); color: #D97706; border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-completed { background: rgba(8, 122, 70, 0.1); color: var(--accent); border: 1px solid rgba(8, 122, 70, 0.2); }
.badge-failed { background: rgba(239, 68, 68, 0.1); color: var(--error); border: 1px solid rgba(239, 68, 68, 0.2); }

/* About Us Layout */
.about-hero {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
    color: white;
    padding: 4rem 5%;
}

.about-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(7, 26, 61, 0.92) 0%, rgba(4, 65, 41, 0.93) 100%);
    z-index: 1;
}

.about-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.about-hero-content h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-hero-content p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 4rem;
}

.about-img {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border);
}

.about-img img {
    width: 100%;
    display: block;
}

/* Contact Us Layout */
.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.contact-info-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2.5rem;
}

.contact-info-card h3 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info-icon {
    font-size: 1.5rem;
    color: var(--secondary);
}

.map-placeholder {
    width: 100%;
    height: 250px;
    background: var(--border);
    border-radius: 8px;
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.map-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
}

.map-label {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: rgba(7, 26, 61, 0.92);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Comprehensive Mobile Responsiveness Overhaul */
@media (max-width: 992px) {
    .dashboard-grid {
        display: flex;
        flex-direction: column;
    }
    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        width: 280px;
        z-index: 999;
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0,0,0,0.2);
        background: var(--bg);
        overflow-y: auto;
    }
    .sidebar.active {
        left: 0;
    }
    .mobile-dashboard-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 5%;
        background: var(--panel);
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        z-index: 900;
    }
    .mobile-dashboard-header .mobile-nav-toggle {
        display: block;
    }
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Desktop navigation scrolls with the page. On narrower desktops the links
   take a second row rather than being hidden behind the mobile menu. */
@media (min-width: 993px) {
    nav { position: relative; }
}

@media (min-width: 993px) and (max-width: 1400px) {
    nav { flex-wrap: wrap; }
    nav .nav-links {
        flex-basis: 100%;
        flex-wrap: wrap;
        justify-content: center;
        margin-top: 0.75rem;
    }
}

@media (max-width: 992px) {
    nav { flex-wrap: wrap; padding: 1rem 5%; }
    .mobile-nav-toggle { display: block; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background: var(--bg);
        padding: 1rem 0;
        gap: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        border-bottom: 1px solid var(--border);
        z-index: 99;
        box-shadow: 0 12px 20px rgba(7, 26, 61, 0.12);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }
    .nav-links.active { display: flex; }
    .nav-links li { text-align: center; width: 100%; }
    .nav-links .btn { width: 90%; margin: 0 auto; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.2rem; }
    .hero { padding: 4rem 1.5rem 3rem; text-align: center; }
    .hero-actions { flex-direction: column; width: 100%; }
    .hero-actions .btn { width: 100%; }
    .form-row { grid-template-columns: 1fr; gap: 1rem; }
    nav .brand-logo { width: 168px; height: 48px; }
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 8px;
        border: 1px solid var(--border);
    }
    table {
        min-width: 650px;
    }
    .tab-menu {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        gap: 0.5rem;
        padding-bottom: 0.75rem;
        -webkit-overflow-scrolling: touch;
    }
    .tab-btn {
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
        flex-shrink: 0;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .main-content {
        padding: 1.5rem 1rem;
    }
    .mobile-dashboard-header .brand-logo {
        width: 150px;
        height: 42px;
    }
    .card {
        padding: 1.25rem;
        border-radius: 12px;
    }
    .welcome-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .role-selector-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .modal-overlay .card {
        padding: 1.25rem !important;
        max-width: 95% !important;
        margin: 0 auto;
    }
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    .product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body { font-size: 0.95rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.2rem; }
    .btn { padding: 0.65rem 1.25rem; font-size: 0.9rem; }
    nav .brand-logo { width: 148px; height: 42px; }
    .brand-logo--sidebar { width: 184px; height: 51px; }
}

/* Production accessibility and small-screen refinements */
button,
input,
select,
textarea {
    font: inherit;
}

button,
.btn,
.mobile-nav-toggle,
.theme-toggle,
.sidebar-link {
    min-height: 44px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.sidebar-link:is(button) {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.body-menu-open {
    overflow: hidden;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 998;
    width: 100%;
    height: 100%;
    min-height: 0;
    border: 0;
    padding: 0;
    background: rgba(3, 12, 24, 0.58);
    cursor: pointer;
}

.sidebar-backdrop.active {
    display: block;
}

.security-note,
.dev-only-note {
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: var(--panel);
    color: var(--text-muted);
    line-height: 1.5;
}

.social-auth {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 1.25rem 0;
}

.social-auth-btn {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 700;
    text-align: center;
    transition: var(--transition);
}

.social-auth-btn:hover,
.social-auth-btn:focus-visible {
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(7, 26, 61, 0.12);
    transform: translateY(-1px);
}

.social-auth-btn span {
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 800;
}

.social-auth-google span { color: #4285f4; background: #fff; border: 1px solid #dadce0; }
.social-auth-facebook span { color: #fff; background: #1877f2; font-family: Arial, sans-serif; }
.social-auth-x span { color: #fff; background: #050505; }

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 1.2rem 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    height: 1px;
    flex: 1;
    background: var(--border);
}

.form-section-note {
    margin: 0 0 1.25rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

.optional-label {
    color: var(--secondary);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-completion-card {
    border: 1px solid rgba(8, 122, 70, 0.32);
    border-top: 5px solid var(--secondary);
    margin-bottom: 2rem;
}

.profile-completion-intro {
    margin-bottom: 1.4rem;
}

.profile-completion-intro h2 {
    margin: 0.45rem 0 0.4rem;
    color: var(--primary);
}

.profile-completion-intro p {
    margin: 0;
    color: var(--text-muted);
}

.profile-step-badge {
    display: inline-flex;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: rgba(245, 163, 0, 0.16);
    color: #8a5700;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-completion-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-message-success { color: var(--secondary); font-weight: 700; }
.form-message-error { color: #b42318; font-weight: 700; }

.technology-credit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    margin-top: 0.9rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    line-height: 1.25;
}

.technology-credit:hover,
.technology-credit:focus-visible {
    color: var(--primary);
}

.technology-credit img {
    width: 38px;
    height: 38px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: #fff;
}

.recaptcha-panel {
    margin-top: 1rem;
    padding: 1rem;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
}

.recaptcha-label {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--primary);
    font-weight: 800;
}

.recaptcha-widget-scroll {
    max-width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
}

.recaptcha-help {
    margin: 0.65rem 0 0;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.5;
}

.recaptcha-config-warning {
    padding: 0.85rem;
    border: 1px solid rgba(245, 163, 0, 0.45);
    border-radius: 8px;
    background: rgba(245, 163, 0, 0.12);
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.5;
}

.pwa-install-button {
    display: block;
    margin: 1rem auto;
    min-height: 48px;
    max-width: calc(100vw - 32px);
    padding: 0.75rem 1rem;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(7, 26, 61, 0.24);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

[data-theme="dark"] .pwa-install-button {
    color: #071a3d;
}

.pwa-install-button:hover,
.pwa-install-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(7, 26, 61, 0.3);
}

.pwa-install-button:disabled {
    opacity: 0.65;
    cursor: wait;
}

.pwa-install-help {
    width: min(420px, calc(100vw - 32px));
    max-height: calc(100dvh - 32px);
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel-card);
    color: var(--text);
    box-shadow: 0 24px 64px rgba(7, 26, 61, 0.28);
    overflow-y: auto;
}

.pwa-install-help::backdrop {
    background: rgba(7, 26, 61, 0.68);
}

.pwa-install-help h2 {
    margin: 0 0 0.75rem;
    color: var(--primary);
}

.pwa-install-help p,
.pwa-install-help li {
    line-height: 1.55;
}

.pwa-install-help ol {
    padding-left: 1.4rem;
    margin: 1rem 0 1.5rem;
}

.pwa-install-help button {
    min-height: 44px;
    padding: 0.65rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

[data-theme="dark"] .pwa-install-help button {
    color: #071a3d;
}

.sidebar .technology-credit {
    width: 100%;
    margin: 0.9rem 0 0;
    justify-content: flex-start;
}

@media (max-width: 992px) {
    .sidebar {
        width: min(88vw, 320px);
        z-index: 1000;
    }
}

@media (max-width: 768px) {
    nav {
        min-height: 64px;
    }

    .mobile-nav-toggle,
    .theme-toggle {
        min-width: 44px;
        padding: 0.5rem;
    }

    .nav-links {
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .auth-container {
        min-height: auto;
        padding: 2rem 1rem;
    }

    .auth-card {
        width: 100%;
        padding: 1.5rem;
    }

    .progress-steps {
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 0.5rem;
    }

    .modal-overlay {
        align-items: flex-start;
        overflow-y: auto;
        padding: 1rem 0;
    }

    .modal-overlay .card {
        max-height: none !important;
    }

    .modal-overlay .form-row,
    .modal-overlay [style*="grid-template-columns"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .filter-bar {
        overflow-x: auto;
        flex-direction: row;
        align-items: center;
        padding-bottom: 0.5rem;
    }

    th,
    td {
        padding: 0.75rem;
    }

    .social-auth {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    input,
    select,
    textarea {
        font-size: 16px;
    }

    .card,
    .auth-card {
        border-radius: 10px;
    }

    .countdown-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .welcome-header h1 {
        font-size: 1.6rem;
    }

    .profile-completion-actions,
    .profile-completion-actions .btn {
        width: 100%;
    }

    .recaptcha-panel {
        padding: 0.85rem;
    }

    .pwa-install-button {
        font-size: 0.88rem;
    }
}

@media (max-width: 420px) {
    .recaptcha-widget-scroll {
        height: 70px;
        overflow: hidden;
    }

    .g-recaptcha {
        width: 338px;
        transform: scale(0.9);
        transform-origin: top left;
    }
}

@media (max-width: 380px) {
    .recaptcha-widget-scroll {
        height: 63px;
    }

    .g-recaptcha {
        width: 380px;
        transform: scale(0.8);
    }
}

@media (max-width: 340px) {
    .recaptcha-widget-scroll {
        height: 50px;
    }

    .g-recaptcha {
        width: 475px;
        transform: scale(0.64);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
