/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors */
    --primary-red: #C13832;
    --primary-green: #2D5F3F;
    --accent-green: #4A7C59;
    --bg-cream: #F5F1ED;
    --bg-light: #FAF8F6;
    --text-dark: #2C2C2C;
    --text-gray: #666666;
    --check-green: #4A7C59;
    
    /* Typography */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

body {
    font-family: var(--font-sans);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Language Selection Popup */
.language-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-content {
    background: white;
    border-radius: 20px;
    padding: 48px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

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

.popup-header {
    margin-bottom: 32px;
}

.popup-logo {
    margin-bottom: 20px;
}

.popup-header h2 {
    font-family: var(--font-serif);
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.popup-header p {
    font-size: 14px;
    color: var(--text-gray);
}

.popup-languages {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.popup-lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: white;
    border: 3px solid var(--border-color);
    padding: 20px 32px;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.popup-lang-btn:hover {
    border-color: var(--primary-red);
    background-color: var(--bg-cream);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(193, 56, 50, 0.2);
}

.popup-lang-btn .lang-flag {
    font-size: 32px;
}

.popup-lang-btn .lang-name {
    font-family: var(--font-serif);
}

/* Language Selector */
.language-selector {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    background: white;
    padding: 8px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.lang-option {
    background: none;
    border: 2px solid transparent;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-gray);
}

.lang-option:hover {
    background-color: var(--bg-cream);
    color: var(--text-dark);
}

.lang-option.active {
    background-color: var(--primary-red);
    color: white;
    border-color: var(--primary-red);
}

/* RTL Support for Arabic */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl .hero-content {
    text-align: right;
}

body.rtl .requirement-card,
body.rtl .detail-item {
    flex-direction: row-reverse;
}

body.rtl .language-selector {
    right: auto;
    left: 20px;
}

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

/* ===== DECORATIVE CORNER FLAGS ===== */
.corner-flag {
    position: fixed;
    width: 0;
    height: 0;
    z-index: 10;
}

.corner-flag-top {
    top: 0;
    left: 0;
    border-top: 80px solid var(--primary-red);
    border-right: 80px solid transparent;
}

.corner-flag-bottom {
    bottom: 0;
    right: 0;
    border-bottom: 100px solid var(--primary-green);
    border-left: 100px solid transparent;
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, var(--bg-cream) 0%, var(--bg-light) 100%);
    padding: 80px 0 60px;
    position: relative;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Logo */
.logo {
    margin-bottom: 40px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

/* Custom Logo Styles */
.custom-logo {
    max-width: 250px;
    max-height: 100px;
    object-fit: contain;
}

.custom-logo-popup {
    max-width: 200px;
    max-height: 80px;
    object-fit: contain;
}

.logo-globe {
    margin-bottom: 4px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.logo-name {
    font-family: var(--font-serif);
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 1px;
}

.logo-red {
    color: #C13832;
}

.logo-green {
    color: #2D5F3F;
}

.logo-tagline-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-line {
    width: 40px;
    height: 1px;
    background-color: var(--text-dark);
}

.logo-tagline {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--text-dark);
    letter-spacing: 0.5px;
}

/* Hero Content */
.hero-title {
    font-family: var(--font-serif);
    font-size: 42px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.hero-description {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 16px;
    line-height: 1.6;
}

.hero-note {
    font-size: 14px;
    color: var(--text-gray);
    margin-bottom: 32px;
    line-height: 1.6;
}

/* CTA Button */
.cta-button {
    background-color: var(--primary-red);
    color: white;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 500;
    padding: 16px 32px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(193, 56, 50, 0.2);
}

.cta-button:hover {
    background-color: #A02E29;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(193, 56, 50, 0.3);
}

.disclaimer {
    font-size: 12px;
    color: var(--text-gray);
    margin-top: 16px;
    line-height: 1.5;
}

/* Hero Image */
.hero-image {
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 500"><rect fill="%23E5E5E5" width="400" height="500"/></svg>');
    background-size: cover;
    background-position: center;
    height: 500px;
    border-radius: 8px;
}

/* ===== ELIGIBILITY SECTION ===== */
.eligibility {
    background-color: var(--bg-cream);
    padding: 80px 0;
}

.section-title {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 600;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.section-subtitle {
    text-align: center;
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 50px;
    line-height: 1.8;
}

.flags {
    font-size: 18px;
}

/* Requirements Grid */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.requirement-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.check-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background-color: var(--check-green);
    border-radius: 50%;
    position: relative;
}

.check-icon::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 18px;
    font-weight: bold;
}

.requirement-content h3 {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.requirement-content p {
    font-size: 14px;
    color: var(--text-gray);
}

.warning-text {
    text-align: center;
    font-size: 15px;
    color: var(--text-dark);
}

.warning-text strong {
    font-weight: 600;
}

/* ===== REQUIREMENTS DETAILS SECTION ===== */
.requirements-details {
    background-color: white;
    padding: 80px 0;
}

.section-title-red {
    font-family: var(--font-serif);
    font-size: 36px;
    font-weight: 600;
    text-align: center;
    color: var(--primary-red);
    margin-bottom: 20px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    margin-top: 50px;
}

.details-column {
    background-color: var(--bg-cream);
    padding: 40px;
    border-radius: 8px;
}

.column-title {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 30px;
}

.detail-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.calendar-icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    background-color: var(--text-dark);
    border-radius: 4px;
    position: relative;
}

.calendar-icon::after {
    content: '📅';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
}

.check-icon-small {
    width: 24px;
    height: 24px;
    min-width: 24px;
    background-color: var(--check-green);
    border-radius: 50%;
    position: relative;
}

.check-icon-small::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.detail-item p {
    font-size: 14px;
    color: var(--text-dark);
    line-height: 1.6;
}

.column-note {
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #D5D5D5;
}

.column-note strong {
    font-weight: 600;
    color: var(--text-dark);
}

/* ===== DOCUMENT UPLOAD SECTION ===== */
.document-upload {
    background-color: var(--bg-light);
    padding: 80px 0;
}

/* Tramita Button - Large Red Button with Glow */
.tramita-button {
    background-color: var(--primary-red);
    color: white;
    font-family: var(--font-sans);
    font-size: 24px;
    font-weight: 700;
    padding: 24px 64px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(193, 56, 50, 0.6),
                0 0 40px rgba(193, 56, 50, 0.4),
                0 4px 15px rgba(0, 0, 0, 0.2);
    margin: 32px auto;
    display: block;
    text-transform: uppercase;
    letter-spacing: 1px;
    animation: pulse-glow 2s ease-in-out infinite;
}

.tramita-button:hover {
    background-color: #A82E29;
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(193, 56, 50, 0.8),
                0 0 60px rgba(193, 56, 50, 0.5),
                0 6px 20px rgba(0, 0, 0, 0.3);
}

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

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(193, 56, 50, 0.6),
                    0 0 40px rgba(193, 56, 50, 0.4),
                    0 4px 15px rgba(0, 0, 0, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(193, 56, 50, 0.8),
                    0 0 60px rgba(193, 56, 50, 0.6),
                    0 4px 15px rgba(0, 0, 0, 0.2);
    }
}

.upload-form {
    max-width: 900px;
    margin: 0 auto;
}

/* Client Info Section */
.client-info-section {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.client-info-section h3 {
    font-family: var(--font-sans);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.form-group input {
    padding: 12px 16px;
    border: 1px solid #D5D5D5;
    border-radius: 6px;
    font-size: 15px;
    font-family: var(--font-sans);
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-green);
}

.document-item {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.document-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.document-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.document-info h3 {
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.document-info p {
    font-size: 14px;
    color: var(--text-gray);
}

.required-badge {
    background-color: #FFF3E0;
    color: #E65100;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Upload Area */
.upload-area {
    position: relative;
}

.upload-area input[type="file"] {
    display: none;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    border: 2px dashed #D5D5D5;
    border-radius: 8px;
    background-color: var(--bg-cream);
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-label:hover {
    border-color: var(--primary-green);
    background-color: #F0F5F2;
}

.upload-label svg {
    color: var(--text-gray);
    margin-bottom: 12px;
}

.upload-text {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.upload-hint {
    font-size: 13px;
    color: var(--text-gray);
}

/* Upload Preview */
.upload-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: var(--bg-cream);
    border-radius: 8px;
    border: 1px solid #D5D5D5;
}

.preview-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-icon {
    color: var(--primary-green);
}

.preview-info {
    display: flex;
    flex-direction: column;
}

.preview-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.preview-size {
    font-size: 12px;
    color: var(--text-gray);
}

.remove-file {
    background-color: transparent;
    border: none;
    color: var(--text-gray);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background-color: #FFE5E5;
    color: var(--primary-red);
}

/* Validation Status */
.validation-status {
    margin-top: 12px;
}

.validation-loading,
.validation-success,
.validation-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.validation-loading {
    background-color: #E3F2FD;
    color: #1976D2;
}

.validation-success {
    background-color: #E8F5E9;
    color: var(--check-green);
}

.validation-error {
    background-color: #FFEBEE;
    color: var(--primary-red);
}

/* Spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #E3F2FD;
    border-top-color: #1976D2;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Actions */
.form-actions {
    text-align: center;
    margin-top: 40px;
}

.submit-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: var(--primary-red);
    color: white;
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    padding: 18px 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(193, 56, 50, 0.2);
}

.submit-button:hover:not(:disabled) {
    background-color: #A02E29;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(193, 56, 50, 0.3);
}

.submit-button:disabled {
    background-color: #CCCCCC;
    cursor: not-allowed;
    box-shadow: none;
}

.button-arrow {
    transition: transform 0.3s ease;
}

.submit-button:hover:not(:disabled) .button-arrow {
    transform: translateX(4px);
}

.form-note {
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 16px;
    line-height: 1.6;
}

/* Checkout Section */
.checkout-section {
    max-width: 600px;
    margin: 40px auto 0;
    text-align: center;
    padding: 40px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.success-message {
    margin-bottom: 32px;
}

.success-message svg {
    margin-bottom: 16px;
}

.success-message h3 {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 600;
    color: var(--check-green);
    margin-bottom: 12px;
}

.success-message p {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.6;
}

.checkout-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: #635BFF;
    color: white;
    font-family: var(--font-sans);
    font-size: 18px;
    font-weight: 600;
    padding: 20px 48px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(99, 91, 255, 0.3);
}

.checkout-button:hover {
    background-color: #5145E5;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 91, 255, 0.4);
}

.checkout-note {
    font-size: 13px;
    color: var(--text-gray);
    margin-top: 16px;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-image {
        height: 400px;
    }

    .requirements-grid,
    .details-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-title {
        font-size: 36px;
    }

    .section-title,
    .section-title-red {
        font-size: 30px;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 20px;
    }

    .hero {
        padding: 60px 0 40px;
    }

    .hero-title {
        font-size: 28px;
    }

    .section-title,
    .section-title-red {
        font-size: 24px;
    }

    .eligibility,
    .requirements-details {
        padding: 60px 0;
    }

    .corner-flag-top {
        border-top: 60px solid var(--primary-red);
        border-right: 60px solid transparent;
    }

    .corner-flag-bottom {
        border-bottom: 80px solid var(--primary-green);
        border-left: 80px solid transparent;
    }
}

