/* Scout Form Page Specific Styles - Matching Hero Section Design */

/* CSS Variables for consistency */
:root {
    --section-padding: 5rem 0;
    --content-max-width: 1200px;
    --border-radius-organic: 20px;
    --transition-smooth: all 0.3s ease;
}

/* Arabic Typography Overrides for Scout Form Page */
[dir="rtl"] .feature-item {
    font-family: 'Tajawal', 'Almarai', 'Arabic Typesetting Regular', sans-serif !important;
    font-weight: 500;
}

[dir="rtl"] .form-section h2 {
    font-family: 'Tajawal', 'Almarai', 'Arabic Typesetting Regular', cursive !important;
    font-weight: 800;
}

[dir="rtl"] .form-section p {
    font-family: 'Tajawal', 'Almarai', 'Arabic Typesetting Regular', sans-serif !important;
    font-weight: 400;
}

[dir="rtl"] .form-group label {
    font-family: 'Tajawal', 'Almarai', 'Arabic Typesetting Regular', sans-serif !important;
    font-weight: 500;
}

[dir="rtl"] .form-control {
    font-family: 'Tajawal', 'Almarai', 'Arabic Typesetting Regular', sans-serif !important;
    font-weight: 400;
}

[dir="rtl"] .form-control::placeholder {
    font-family: 'Tajawal', 'Almarai', 'Arabic Typesetting Regular', sans-serif !important;
    font-weight: 300;
}

[dir="rtl"] .btn-primary {
    font-family: 'Tajawal', 'Almarai', 'Arabic Typesetting Regular', sans-serif !important;
    font-weight: 700;
}

[dir="rtl"] .form-step h3 {
    font-family: 'Tajawal', 'Almarai', 'Arabic Typesetting Regular', cursive !important;
    font-weight: 700;
}

[dir="rtl"] .form-step p {
    font-family: 'Tajawal', 'Almarai', 'Arabic Typesetting Regular', sans-serif !important;
    font-weight: 400;
}

[dir="rtl"] .success-message h2 {
    font-family: 'Tajawal', 'Almarai', 'Arabic Typesetting Regular', cursive !important;
    font-weight: 800;
}

[dir="rtl"] .success-message p {
    font-family: 'Tajawal', 'Almarai', 'Arabic Typesetting Regular', sans-serif !important;
    font-weight: 400;
}

/* Hero Features for Scout Form */
.hero-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--white);
    font-family: "Readex Pro", "Cairo", sans-serif;
    font-size: 1.1rem;
}

.feature-item i {
    color: var(--scout-gold);
    font-size: 1.2rem;
}

/* Scout Form Section */
.scout-form-section {
    background-color: var(--dark-green);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.scout-form-section .container {
    position: relative;
    z-index: 2;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.scout-form-container {
    background: white;
    border-radius: var(--border-radius-organic);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
}

.scout-form-header {
    background: linear-gradient(135deg, var(--dark-green) 0%, var(--medium-green) 50%, #2d5a3d 100%);
    color: var(--off-white);
    text-align: center;
    padding: 50px 20px;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--scout-gold);
}

.scout-form-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(218, 186, 122, 0.15) 0%, rgba(255, 255, 255, 0.05) 50%, transparent 100%);
    z-index: 1;
}

.scout-form-header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(218, 186, 122, 0.1) 0%, transparent 70%);
    z-index: 1;
    animation: headerGlow 8s ease-in-out infinite;
}

@keyframes headerGlow {
    0%, 100% { opacity: 0.3; transform: rotate(0deg); }
    50% { opacity: 0.6; transform: rotate(180deg); }
}

.scout-form-header h2 {
    font-family: 'Gluten', cursive;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
    position: relative;
    z-index: 2;
    color: var(--scout-gold);
}

.scout-form-header p {
    font-family: "Readex Pro", "Cairo", sans-serif;
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
    position: relative;
    z-index: 2;
    color: var(--white);
}

.scout-form-body {
    padding: 40px;
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
}

.scout-form-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(107, 124, 90, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(218, 186, 122, 0.05) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.scout-form-body > * {
    position: relative;
    z-index: 2;
}

/* Form Sections */
.form-section {
    margin-bottom: 40px;
    padding: 30px;
    border-radius: 15px;
    transition: var(--transition-smooth);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.95) 100%);
    border: 1px solid rgba(218, 186, 122, 0.2);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--scout-gold) 0%, var(--medium-green) 50%, var(--scout-gold) 100%);
    z-index: 1;
}

.form-section:hover {
    box-shadow: 0 15px 40px rgba(218, 186, 122, 0.25), 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
    border-color: rgba(218, 186, 122, 0.4);
}

.form-section:hover::before {
    background: linear-gradient(90deg, var(--scout-gold) 0%, #f4d03f 50%, var(--scout-gold) 100%);
    height: 6px;
}

.form-section h3 {
    color: var(--dark-green);
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 700;
    border-bottom: 3px solid var(--scout-gold);
    padding-bottom: 15px;
    font-family: 'Gluten', cursive;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 2;
}

.form-section h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--medium-green);
    border-radius: 2px;
}

.form-section label {
    color: var(--dark-green);
    font-weight: 600;
}

/* Form Grid Layout */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-green);
    font-family: "Readex Pro", "Cairo", sans-serif;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition-smooth);
    font-family: "Readex Pro", "Cairo", sans-serif;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--scout-gold);
    box-shadow: 0 0 0 4px rgba(218, 186, 122, 0.25), inset 0 2px 4px rgba(0, 0, 0, 0.05);
    background: linear-gradient(145deg, #ffffff 0%, #fffef7 100%);
    transform: translateY(-1px);
}

.form-group input[type="file"] {
    padding: 8px;
    border: 2px dashed var(--scout-gold);
    background-color: rgba(218, 186, 122, 0.05);
    cursor: pointer;
}

.form-group input[type="file"]:hover {
    background-color: rgba(218, 186, 122, 0.1);
}

.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 5px;
    font-family: "Readex Pro", "Cairo", sans-serif;
    font-style: italic;
}

/* Error Messages */
.error-message {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: 2px solid rgba(220, 53, 69, 0.3);
    border-radius: 12px;
    margin: 20px 0;
    padding: 20px 50px 20px 20px; /* Added right padding to prevent icon overlap */
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.2);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.error-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.7) 50%, #fff 100%);
    z-index: 1;
}

.error-message::after {
    content: '⚠️';
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.5rem;
    opacity: 0.8;
    z-index: 3;
    line-height: 1;
}

.error-message-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
    position: relative;
    z-index: 2;
}

.error-message-header::before {
    content: '🚫';
    font-size: 1.3rem;
    animation: pulse 2s infinite;
}

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

.error-message ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 2;
}

.error-message li {
    color: #fff;
    margin-bottom: 8px;
    padding: 5px 0;
    font-weight: 500;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
    font-size: 0.95rem;
}

.error-message li::before {
    content: '•';
    color: rgba(255, 255, 255, 0.8);
    font-weight: bold;
    font-size: 1.2rem;
    margin-top: -2px;
    flex-shrink: 0;
}

.error-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(220, 53, 69, 0.3);
    transition: var(--transition-smooth);
}

/* Mobile responsive error messages */
@media (max-width: 768px) {
    .error-message {
        margin: 15px auto;
        max-width: 90%;
        text-align: center;
        padding: 45px 15px 18px 15px; /* Added top padding for centered icon */
    }

    .error-message-header {
        justify-content: center;
        font-size: 1rem;
    }

    .error-message li {
        justify-content: center;
        text-align: left;
        font-size: 0.9rem;
    }

    .error-message::after {
        top: 12px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .error-message {
        margin: 10px auto;
        max-width: 95%;
        padding: 40px 12px 15px 12px; /* Added top padding for centered icon */
        border-radius: 10px;
    }

    .error-message-header {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .error-message li {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .error-message::after {
        top: 10px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        font-size: 1.3rem;
    }
}

/* Submit Section */
.form-submit-section {
    text-align: center;
    margin-top: 50px;
    padding: 40px 30px;
    border-top: 3px solid var(--scout-gold);
    background: linear-gradient(135deg, rgba(218, 186, 122, 0.05) 0%, rgba(107, 124, 90, 0.05) 100%);
    border-radius: 15px;
    position: relative;
}

.form-submit-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--medium-green) 0%, var(--scout-gold) 50%, var(--medium-green) 100%);
    border-radius: 0 0 10px 10px;
}

.btn-submit {
    background: linear-gradient(135deg, var(--scout-gold) 0%, #f4d03f 50%, var(--scout-gold) 100%);
    color: var(--dark-green);
    border: none;
    padding: 18px 45px;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition-smooth);
    font-family: "Readex Pro", "Cairo", sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 25px rgba(218, 186, 122, 0.4), 0 4px 10px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:hover {
    background: linear-gradient(135deg, #f4d03f 0%, #e6c200 50%, #f4d03f 100%);
    color: var(--dark-green);
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(218, 186, 122, 0.5), 0 6px 15px rgba(0, 0, 0, 0.15);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-submit i {
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .scout-form-container {
        margin: 20px;
        border-radius: 15px;
    }

    .scout-form-header {
        padding: 30px 20px;
    }

    .scout-form-header h2 {
        font-size: 2rem;
    }

    .scout-form-body {
        padding: 30px 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-section {
        padding: 20px;
        margin-bottom: 30px;
    }

    .form-section h3 {
        font-size: 1.3rem;
    }

    .btn-submit {
        padding: 12px 30px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .scout-form-section {
        padding: 3rem 0;
    }

    .scout-form-header h2 {
        font-size: 1.8rem;
    }

    .scout-form-header p {
        font-size: 1rem;
    }

    .form-section {
        padding: 15px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

/* Animation for form sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: fadeInUp 0.6s ease-out;
}

.form-section:nth-child(1) { animation-delay: 0.1s; }
.form-section:nth-child(2) { animation-delay: 0.2s; }
.form-section:nth-child(3) { animation-delay: 0.3s; }

/* Loading state for submit button */
.btn-submit.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn-submit.loading i {
    animation: spin 1s linear infinite;
}

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

/* Success state styling */
.form-section.success {
    border-left-color: #28a745;
    background-color: rgba(40, 167, 69, 0.05);
}

/* Custom select styling */
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* File input styling */
.form-group input[type="file"] {
    position: relative;
    cursor: pointer;
}

.form-group input[type="file"]::before {
    content: '📁 Choose File';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--scout-gold);
    color: var(--dark-green);
    border-radius: 6px;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.form-group input[type="file"]:hover::before {
    background-color: #e6c200;
}

.form-group input[type="file"]::-webkit-file-upload-button {
    visibility: hidden;
}

.form-group input[type="file"]::file-selector-button {
    visibility: hidden;
}
