/**
 * Recruitment Page - Premium Design System
 * Al Ayn BD - Professional, Luxury Brand Aesthetic
 * Gold Color Profile: #C9A962
 */

/* ============================================
   ROOT VARIABLES & BASE
   ============================================ */
:root {
    --gold: #C9A962;
    --gold-light: #D4B978;
    --gold-dark: #B69847;
    --gold-glow: rgba(201, 169, 98, 0.3);
    --primary: #10b981;
    --primary-dark: #059669;
    --accent: #0d9488;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --bg-warm: #fafaf9;
    --bg-card: #ffffff;
    --bg-cream: #FEFDFB;
    --border-soft: #e5e7eb;
    --border-gold: rgba(201, 169, 98, 0.25);
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -1px rgba(0,0,0,0.04);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-gold: 0 4px 20px rgba(201, 169, 98, 0.25);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

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

html, body {
    overflow-x: hidden;
    max-width: 100vw;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

/* ============================================
   HEADER - LUXURY GOLD BRANDING
   ============================================ */
.site-header {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(254, 253, 251, 0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-gold);
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 20px rgba(201, 169, 98, 0.15);
    border-bottom-color: var(--gold);
}

.site-header a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 17px;
    letter-spacing: -0.01em;
}

.site-header .logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.site-header .logo-mark {
    width: 38px;
    height: 38px;
    background: linear-gradient(145deg, var(--gold), var(--gold-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(201, 169, 98, 0.35);
}

/* Gold Logo Shine Animation */
.logo-shine {
    display: inline-block;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    background: linear-gradient(
        90deg,
        var(--gold) 0%,
        var(--gold) 35%,
        rgba(255,255,255,0.95) 50%,
        var(--gold) 65%,
        var(--gold) 100%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: logo-shine 4s ease-in-out infinite;
}

@keyframes logo-shine {
    0% { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* Alternate shine direction randomly */
.logo-shine.reverse {
    animation-direction: reverse;
}

@media (max-width: 640px) {
    .site-header { padding: 12px 16px; }
    .site-header .logo-mark { width: 34px; height: 34px; font-size: 14px; }
    .site-header a { font-size: 15px; }
}

/* ============================================
   HERO SECTION - LUXURY GOLD ACCENTS
   ============================================ */
.hero-section {
    position: relative;
    background: linear-gradient(160deg, #FEFDFB 0%, #FDF9F3 40%, #F9F7F4 70%, #ecfdf5 100%);
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(201, 169, 98, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 10%, var(--gold) 50%, transparent 90%);
    opacity: 0.4;
}

/* Decorative gold accent */
.hero-section .gold-accent {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 169, 98, 0.08) 0%, transparent 70%);
    filter: blur(40px);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.hero-title .highlight {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.hero-title .highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
    border-radius: 2px;
    opacity: 0.6;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 2.5vw, 1.125rem);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 540px;
}

/* Position Details Card - Premium Gold Border */
.position-card {
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-cream) 100%);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    box-shadow: var(--shadow-lg), 0 0 0 1px var(--border-gold);
    border: 2px solid transparent;
    background-clip: padding-box;
    position: relative;
}

.position-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 50%, var(--gold) 100%);
    border-radius: calc(var(--radius-lg) + 2px);
    z-index: -1;
    opacity: 0.4;
}

.position-card h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.position-card h2 svg {
    color: var(--gold);
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
}

.info-badge.emerald { background: linear-gradient(135deg, #10b981, #059669); }
.info-badge.blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.info-badge.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.info-badge.gold { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); }

.info-badge .label {
    opacity: 0.85;
    font-weight: 500;
    font-size: 11px;
}

/* CTA Button - Premium Gold */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #fff;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(201, 169, 98, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
}

/* Gold shine effect on CTA button */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.25) 50%,
        transparent 100%
    );
    animation: cta-shine 3s ease-in-out infinite;
}

@keyframes cta-shine {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 98, 0.5);
}

.cta-button:active {
    transform: translateY(0);
}

@media (max-width: 640px) {
    .position-card { padding: 16px 18px; }
    .info-badge { padding: 8px 12px; font-size: 12px; }
    .cta-button { padding: 12px 24px; font-size: 14px; width: 100%; justify-content: center; }
}

/* ============================================
   JOB CARDS - CLEAN DESIGN
   ============================================ */
.job-section {
    background: var(--bg-warm);
}

.section-title {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 8px;
}

.section-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    text-align: center;
}

.job-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-soft);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.job-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(16, 185, 129, 0.2);
}

.job-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: transform 0.2s;
}

.job-card:hover .job-card-icon {
    transform: scale(1.05);
}

.job-card-icon.pink { background: #fdf2f8; color: #ec4899; }
.job-card-icon.blue { background: #eff6ff; color: #3b82f6; }
.job-card-icon.green { background: #ecfdf5; color: #10b981; }
.job-card-icon.violet { background: #f5f3ff; color: #8b5cf6; }
.job-card-icon.amber { background: #fffbeb; color: #f59e0b; }

.job-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.job-card .tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 12px;
}

.job-card .tag.pink { background: #fce7f3; color: #be185d; }
.job-card .tag.blue { background: #dbeafe; color: #1d4ed8; }
.job-card .tag.green { background: #d1fae5; color: #047857; }
.job-card .tag.violet { background: #ede9fe; color: #6d28d9; }

.job-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.65;
    flex-grow: 1;
}

/* Wide Card (Others) */
.job-card-wide {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    border: 1px solid #fde68a;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.job-card-wide .job-card-icon {
    flex-shrink: 0;
    margin-bottom: 0;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .job-card { padding: 20px; }
    .job-card-icon { width: 44px; height: 44px; }
}

@media (max-width: 480px) {
    .job-card { padding: 18px; }
}

/* ============================================
   REQUIREMENTS SECTION
   ============================================ */
.requirements-section {
    background: #fff;
}

.requirement-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.requirement-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-radius: 0 0 0 100%;
    opacity: 0.5;
}

.requirement-card.amber::before { background: #fef3c7; }
.requirement-card.emerald::before { background: #d1fae5; }

.requirement-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.requirement-card-header .icon-box {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.requirement-card-header .icon-box.amber { background: #fef3c7; color: #d97706; }
.requirement-card-header .icon-box.emerald { background: #d1fae5; color: #059669; }

.requirement-card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.requirement-list {
    list-style: none;
    padding: 0;
}

.requirement-list li {
    position: relative;
    padding-left: 24px;
    padding-top: 8px;
    padding-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0,0,0,0.04);
}

.requirement-list li:last-child {
    border-bottom: none;
}

.requirement-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.requirement-list.amber li::before { background: #f59e0b; }
.requirement-list.emerald li::before { background: #10b981; }

@media (max-width: 768px) {
    .requirement-card { padding: 22px; }
}

/* ============================================
   FORM SECTION - PREMIUM GOLD DESIGN
   ============================================ */
.form-section {
    background: linear-gradient(180deg, #FEFDFB 0%, #F9F7F4 50%, #f1f5f9 100%);
    position: relative;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    border-radius: 0 0 4px 4px;
}

.form-container {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.08), 0 0 0 1px var(--border-gold);
    overflow: hidden;
    position: relative;
}

.form-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    padding: 32px 36px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

/* Gold shimmer effect on form header */
.form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 169, 98, 0.1) 50%,
        transparent 100%
    );
    animation: header-shimmer 6s ease-in-out infinite;
}

@keyframes header-shimmer {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.form-header::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 24px;
    background: var(--bg-card);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Gold accent bar at top of header */
.form-header .gold-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-light), var(--gold), var(--gold-dark));
    background-size: 200% 100%;
    animation: gold-bar-flow 3s linear infinite;
}

@keyframes gold-bar-flow {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
    font-family: 'Playfair Display', Georgia, serif;
    letter-spacing: 0.02em;
    position: relative;
    z-index: 1;
}

.form-header h2 span {
    color: var(--gold);
}

.form-header p {
    font-size: 0.95rem;
    opacity: 0.85;
    position: relative;
    z-index: 1;
}

.form-body {
    padding: 32px;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.form-group-title .icon-box {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
}

/* Input Fields */
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 14px 16px;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    background: #fff;
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(201, 169, 98, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: #9ca3af;
}

.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 44px;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

/* Checkbox Cards */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}

.checkbox-card {
    position: relative;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.checkbox-card:hover {
    background: rgba(201, 169, 98, 0.05);
    border-color: rgba(201, 169, 98, 0.4);
}

.checkbox-card.checked {
    background: rgba(201, 169, 98, 0.08);
    border-color: var(--gold);
}

.checkbox-card input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.checkbox-card-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.checkbox-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.checkbox-card-text h4 {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.checkbox-card-text p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.checkbox-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.checkbox-card.checked .checkbox-indicator {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

/* Submit Button - Premium Gold */
.submit-button {
    width: 100%;
    padding: 18px 32px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    color: #fff;
    border: 2px solid var(--gold);
    border-radius: var(--radius-lg);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(201, 169, 98, 0.25);
    position: relative;
    overflow: hidden;
}

/* Gold accent shimmer on submit button */
.submit-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 169, 98, 0.15) 50%,
        transparent 100%
    );
    animation: submit-shimmer 4s ease-in-out infinite;
}

@keyframes submit-shimmer {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

.submit-button:hover {
    box-shadow: 0 8px 25px rgba(201, 169, 98, 0.4);
    transform: translateY(-2px);
    border-color: var(--gold-light);
    background: linear-gradient(135deg, #252525 0%, #353535 50%, #252525 100%);
}

.submit-button:active {
    transform: translateY(0);
}

/* Submit button text styling */
.submit-button span {
    color: var(--gold);
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .form-header { padding: 22px 20px; }
    .form-header h2 { font-size: 1.2rem; }
    .form-body { padding: 24px 20px; }
    .checkbox-grid { grid-template-columns: 1fr; }
    .submit-button { padding: 16px 24px; font-size: 1rem; }
}

@media (max-width: 480px) {
    .form-body { padding: 20px 16px; }
    .form-input, .form-textarea, .form-select { padding: 12px 14px; font-size: 16px; }
}

/* ============================================
   UPLOAD SECTIONS
   ============================================ */
.upload-box {
    border: 2px dashed #d1d5db;
    border-radius: var(--radius-md);
    padding: 24px;
    text-align: center;
    background: #fafafa;
    transition: all 0.2s;
    cursor: pointer;
}

.upload-box:hover {
    border-color: var(--primary);
    background: #f0fdf9;
}

.upload-box-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    background: #ecfdf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-dark);
}

.upload-box-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.upload-box-subtitle {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.upload-buttons {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 16px;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.upload-btn.primary {
    background: var(--primary);
    color: #fff;
    border: none;
}

.upload-btn.primary:hover {
    background: var(--primary-dark);
}

.upload-btn.secondary {
    background: #fff;
    color: var(--text-primary);
    border: 1px solid #d1d5db;
}

.upload-btn.secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

@media (max-width: 640px) {
    .upload-box { padding: 20px 16px; }
    .upload-box-icon { width: 48px; height: 48px; }
    .upload-buttons { flex-direction: column; }
    .upload-btn { width: 100%; justify-content: center; }
}

/* ============================================
   MODALS - REFINED
   ============================================ */
/* Hidden modals must stay hidden */
#photoModal.hidden, #videoModal.hidden, #nidCameraModal.hidden {
    display: none !important;
}

#photoModal, #videoModal, #nidCameraModal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    flex-direction: column;
}

/* Modals visible state */
#photoModal:not(.hidden), #videoModal:not(.hidden), #nidCameraModal:not(.hidden) {
    display: flex;
}

#photoModalVideo, #videoModalVideo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-header {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-controls {
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.modal-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-btn.capture {
    width: 64px;
    height: 64px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-btn.capture:hover {
    transform: scale(1.05);
}

.modal-btn.secondary {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.modal-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.25);
}

@media (max-width: 768px) {
    .modal-header { padding: 10px 12px; }
    .modal-controls { padding: 12px; gap: 12px; }
    .modal-btn.capture { width: 56px; height: 56px; }
    .modal-btn.secondary { width: 40px; height: 40px; }
}

/* ============================================
   ALERTS & NOTICES
   ============================================ */
.notice-box {
    padding: 14px 16px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notice-box.warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.notice-box.info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.notice-box.pink {
    background: #fdf2f8;
    border: 1px solid #fbcfe8;
}

.notice-box-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.notice-box p {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.5;
}

@media (max-width: 640px) {
    .notice-box { padding: 12px 14px; }
    .notice-box p { font-size: 0.825rem; }
}

/* ============================================
   CTA SECTION - PREMIUM GOLD DESIGN
   ============================================ */
.cta-section-gold {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
}

.cta-gold-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 169, 98, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(201, 169, 98, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(201, 169, 98, 0.08) 0%, transparent 40%);
}

/* Animated gold particles */
.cta-gold-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(201, 169, 98, 0.03) 25%,
        rgba(201, 169, 98, 0.08) 50%,
        rgba(201, 169, 98, 0.03) 75%,
        transparent 100%
    );
    animation: cta-bg-shimmer 8s ease-in-out infinite;
}

@keyframes cta-bg-shimmer {
    0%, 100% { transform: translateX(-25%); }
    50% { transform: translateX(25%); }
}

/* Gold accent lines */
.cta-gold-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.5;
}

.cta-gold-content {
    text-align: center;
}

.cta-gold-badge {
    display: inline-block;
    margin-bottom: 20px;
}

.cta-gold-badge span {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #000;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(201, 169, 98, 0.4);
}

.cta-gold-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.cta-gold-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.15rem);
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 32px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.cta-gold-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: transparent;
    color: var(--gold);
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border: 2px solid var(--gold);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.cta-gold-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.cta-gold-button:hover::before {
    opacity: 1;
}

.cta-gold-button:hover {
    color: #000;
    box-shadow: 0 8px 30px rgba(201, 169, 98, 0.4);
    transform: translateY(-2px);
}

.cta-btn-text, .cta-btn-icon {
    position: relative;
    z-index: 1;
}

.cta-btn-icon {
    display: flex;
    align-items: center;
}

.cta-gold-features {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(201, 169, 98, 0.2);
}

.cta-feature-icon {
    font-size: 18px;
}

@media (max-width: 640px) {
    .cta-gold-content { padding: 48px 16px; }
    .cta-gold-features { gap: 12px; }
    .cta-feature {
        padding: 8px 12px;
        font-size: 12px;
        flex: 1;
        min-width: 140px;
        justify-content: center;
    }
    .cta-gold-button { padding: 14px 28px; font-size: 15px; }
}

/* Legacy CTA section (keep for backward compatibility) */
.cta-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    text-align: center;
    padding: 48px 20px;
}

.cta-section h2 {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 20px;
}

.cta-section .cta-button {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(201, 169, 98, 0.3);
}

.cta-section .cta-button:hover {
    box-shadow: 0 8px 25px rgba(201, 169, 98, 0.4);
}

/* ============================================
   BROWSER & TOUCH FIXES
   ============================================ */
@supports (-webkit-touch-callout: none) {
    #photoModal, #videoModal {
        height: 100vh;
        height: -webkit-fill-available;
    }
    #photoModal, #videoModal, #nidCameraModal {
        overscroll-behavior: none;
    }
}

video {
    -webkit-playsinline: true;
    playsinline: true;
    background-color: #000;
}

button, a, label {
    -webkit-tap-highlight-color: rgba(16, 185, 129, 0.1);
    touch-action: manipulation;
}

img, video {
    -webkit-touch-callout: none;
}

/* Touch targets */
@media (max-width: 768px) {
    button, a, label, select {
        min-height: 44px;
    }
}

/* Landscape */
@media (max-height: 500px) and (orientation: landscape) {
    .modal-header { padding: 6px 10px; }
    .modal-controls { padding: 8px; }
    .modal-btn.capture { width: 48px; height: 48px; }
    .modal-btn.secondary { width: 36px; height: 36px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   SUCCESS/ERROR STATES
   ============================================ */
.success-message {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
}

.success-message-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.success-message h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.success-message p {
    color: var(--text-secondary);
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: #991b1b;
    font-size: 0.9rem;
}

/* ============================================
   PHOTO PREVIEW GRID
   ============================================ */
.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.photo-preview-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #f3f4f6;
    position: relative;
}

.photo-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-preview-item .photo-label {
    position: absolute;
    bottom: 4px;
    left: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 10px;
    padding: 3px 6px;
    border-radius: 4px;
    text-align: center;
}

@media (max-width: 640px) {
    .photo-preview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   POSE INDICATOR STEPS
   ============================================ */
.pose-steps {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
}

.pose-step {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.pose-step.active {
    background: #fff;
    color: #111;
}

.pose-step.completed {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 375px) {
    .pose-step span:not(.icon) { display: none; }
    .pose-step { padding: 6px 8px; }
}

/* ============================================
   COUNTDOWN OVERLAY
   ============================================ */
.countdown-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.countdown-number {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    color: var(--primary-dark);
    animation: pulse-countdown 1s ease-in-out infinite;
}

@keyframes pulse-countdown {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@media (max-width: 640px) {
    .countdown-number { width: 64px; height: 64px; font-size: 32px; }
}

/* ============================================
   HUSBAND SECTION
   ============================================ */
.husband-section {
    background: linear-gradient(135deg, #faf5ff, #fdf2f8);
    border: 1px solid #e9d5ff;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-top: 24px;
}

.husband-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.husband-section-header .icon {
    width: 36px;
    height: 36px;
    background: #fff;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a855f7;
    box-shadow: var(--shadow-sm);
}

.husband-section-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

@media (max-width: 640px) {
    .husband-section { padding: 18px; }
}

/* ============================================
   TERMS CHECKBOX
   ============================================ */
.terms-box {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 18px;
}

.terms-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.terms-checkbox {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 2px;
    accent-color: var(--primary);
}

.terms-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ============================================
   FACE DETECTION STATUS
   ============================================ */
.face-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.face-status.detecting {
    background: #fffbeb;
    color: #b45309;
}

.face-status.detected {
    background: #ecfdf5;
    color: #047857;
}

.face-status.not-detected {
    background: #fef2f2;
    color: #b91c1c;
}
