/* style.css v1.0 */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;600;700&display=swap');

:root {
    --primary-red: #cc5e4a;
    --secondary-green: #6b8e23;
    --accent-orange: #e76f51;
    --accent-yellow: #f4a261;
    --background-cream: #fdf6f0;
    --text-dark: #333333;
}

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

html, body {
    min-height: 100vh;
    height: 100%;
    background-color: var(--background-cream);
}

/* Force background on mobile - Brave Android fix */
html::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--background-cream);
    z-index: -9999;
    pointer-events: none;
}

body {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-dark);
    line-height: 1.7;
    padding: 0;
    margin: 0;
}

/* Typography */
h2 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    color: var(--primary-red);
    margin-bottom: 25px;
    font-weight: 700;
    text-align: center;
}

h3 {
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--secondary-green);
    margin: 30px 0 15px;
}

p, li, label {
    font-size: 1.1rem;
}

/* Header */
header {
    background: url('images/hero-bg.jpg') center/cover no-repeat;
    background-color: var(--accent-yellow);
    padding: 80px 20px;
    text-align: center;
    color: white;
    position: relative;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(191, 120, 77, 0.4);
    z-index: 0;
}

header > * {
    position: relative;
    z-index: 1;
}

header a {
    color: white;
    text-decoration: underline;
}

header a:hover {
    color: var(--accent-yellow);
}

.logo-text {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    letter-spacing: 1px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 10px;
}

.subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    font-weight: 400;
    margin-bottom: 20px;
}

.intro {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Language Switcher */
.lang-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.9);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    z-index: 10;
    display: flex;
    gap: 8px;
    align-items: center;
}

.lang-switcher .separator {
    color: var(--primary-red);
    font-weight: normal;
}

.lang-link {
    color: var(--primary-red);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.lang-link:hover {
    opacity: 0.7;
}

.lang-link img {
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Main Content */
.map-link {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    margin: 20px auto 30px auto;
    max-width: 700px;
    color: var(--primary-red);
}

.map-link a {
    color: var(--accent-orange);
    text-decoration: underline;
}

.map-link a:hover {
    color: var(--primary-red);
}

main {
    max-width: 900px;
    margin: 60px auto;
    padding: 0 20px;
}

section {
    margin-bottom: 80px;
}

/* Scroll Hint */
.scroll-hint {
    text-align: center;
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 700;
    color: var(--primary-red);
    margin: 30px auto;
    font-family: 'Cormorant Garamond', serif;
    cursor: pointer;
    display: block;
    width: fit-content;
    padding: 10px 20px;
    border-radius: 12px;
    background: rgba(204, 94, 74, 0.08);
    transition: all 0.3s ease;
    margin-left: auto;
    margin-right: auto;
}

.scroll-hint:hover {
    background: rgba(204, 94, 74, 0.2);
    transform: scale(1.03);
    color: #b33d3d;
    box-shadow: 0 4px 12px rgba(204, 94, 74, 0.2);
}

/* Urgency Line */
.urgency-line {
    text-align: center;
    font-size: clamp(1.3rem, 3.5vw, 2.2rem);
    font-weight: 700;
    color: white;
    background: var(--secondary-green);
    padding: 16px 24px;
    margin: 10px auto 40px auto;
    border-radius: 12px;
    font-family: 'Cormorant Garamond', serif;
    box-shadow: 0 4px 8px rgba(107, 142, 35, 0.2);
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Info Box */
.info-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    border-left: 5px solid var(--accent-orange);
    max-width: calc(100% - 40px);
    margin-left: auto;
    margin-right: auto;
}

.info-box p {
    margin-bottom: 12px;
    font-size: 1.1rem;
}

/* Rules */
.rules {
    list-style-type: none;
    padding: 0;
    margin: 25px 0;
}

.rules li {
    background: var(--background-cream);
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 10px;
    border: 2px solid var(--secondary-green);
    font-weight: 600;
    font-size: 1.05rem;
}

.rules .do {
    display: block;
    color: var(--primary-red);
    font-weight: 700;
    margin-bottom: 5px;
}

.rules .dont {
    display: block;
    color: #e76f51;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0.9;
}

/* Application Form */
.application-form {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    max-width: 700px;
    margin: 0 auto;
}

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

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-red);
    font-size: 1.1rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="file"],
textarea {
    width: 100%;
    padding: 14px;
    font-size: 1.1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

input[type="file"] {
    padding: 8px;
}

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

.photo-hint {
    font-size: 0.95rem;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

/* Photo Preview */
.photo-preview {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.photo-preview img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
}

/* Category Search */
.category-search-container {
    margin-bottom: 15px;
}

.category-search {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid var(--secondary-green);
    border-radius: 8px;
    font-family: inherit;
}

.category-search:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* Tags */
.tags-container {
    margin-top: 15px;
}

.tag-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tag-options span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: #f0f0f0;
    border: 2px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    min-height: 44px;
    text-align: center;
}

.tag-options span:hover {
    background: var(--accent-yellow);
    border-color: var(--secondary-green);
    transform: translateY(-2px);
}

.tag-options span.selected {
    background: var(--secondary-green);
    color: white;
    border-color: var(--secondary-green);
}

.selected-tags {
    min-height: 60px;
    padding: 15px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-start;
}

.selected-tags:empty::after {
    content: 'Selected categories will appear here';
    color: #999;
    font-style: italic;
    font-size: 0.95rem;
}

.selected-tags .tag {
    background: var(--secondary-green);
    color: white;
    padding: 8px 14px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    min-height: 36px;
}

.selected-tags .tag .remove {
    cursor: pointer;
    font-weight: bold;
    font-size: 1.3rem;
    line-height: 1;
    transition: transform 0.2s;
}

.selected-tags .tag .remove:hover {
    transform: scale(1.2);
}

/* Checkbox */
.legal-section {
    margin: 25px 0;
}

.checkbox-container {
    display: block;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    font-size: 1.1rem;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #fff;
    border: 2px solid var(--primary-red);
    border-radius: 6px;
    transition: background-color 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #fff5f5;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: var(--primary-red);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Submit Button */
button[type="submit"] {
    display: block;
    width: 100%;
    padding: 16px;
    font-size: 1.3rem;
    font-weight: 700;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: 'Cormorant Garamond', serif;
}

button[type="submit"]:hover:not(:disabled) {
    background: #b33d3d;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 94, 74, 0.3);
}

button[type="submit"]:disabled {
    background: #999;
    cursor: not-allowed;
}

.button-loader {
    display: inline-block;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    max-width: 800px;
    max-height: 80vh;
    overflow: auto;
    font-size: 1.1rem;
    line-height: 1.6;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    padding: 0;
    width: 40px;
    height: 40px;
    line-height: 1;
}

.modal-close:hover {
    color: var(--primary-red);
}

.modal-content h3 {
    color: var(--primary-red);
    margin-bottom: 20px;
}

.modal-content p {
    margin-bottom: 15px;
}

.modal-confirm {
    margin-top: 20px;
    padding: 12px 24px;
    background: var(--primary-red);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: background 0.3s;
}

.modal-confirm:hover {
    background: #b33d3d;
}

/* Visitor Section */
.visitor-section {
    text-align: center;
    padding: 40px 20px;
    background: rgba(231, 111, 81, 0.08);
    border-radius: 15px;
}

.visitor-section p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    background: var(--secondary-green);
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 15px;
    right: 20px;
    background-color: var(--primary-red);
    color: white;
    border: none;
    border-radius: 10%;
    width: 60px;
    height: 60px;
    font-family: 'Cormorant Garamond', serif;
    font-weight: 700;
    font-size: 1.4rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: #b33d3d;
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .logo-text {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }
    
    .info-box,
    .application-form {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    header {
        padding: 60px 15px;
    }
    
    main {
        margin: 40px auto;
    }
    
    .lang-switcher {
        position: fixed;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        right: auto;
        background: rgba(255, 255, 255, 0.95);
        padding: 6px 10px;
        border-radius: 8px;
        font-size: 0.85rem;
        gap: 6px;
        z-index: 1001;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .lang-switcher img {
        width: 24px;
        height: 16px;
    }
    
    .scroll-hint {
        font-size: 1.5rem;
        padding: 8px 16px;
        margin: 20px auto;
    }
    
    .urgency-line {
        font-size: 1.3rem;
        padding: 10px 18px;
        margin: 10px auto 30px auto;
    }
    
    .application-form h3 {
        text-align: center;
    }
    
    .tag-options span {
        font-size: 0.9rem;
        padding: 10px 14px;
        min-width: auto;
    }
    
    .rules li {
        font-size: 1rem;
        padding: 15px;
    }
    
    .application-form {
        padding: 18px;
    }
    
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        padding: 12px;
        font-size: 1rem;
    }
    
    button[type="submit"] {
        padding: 14px;
        font-size: 1.2rem;
    }
    
    .checkbox-container {
        font-size: 1rem;
        padding-left: 30px;
    }
    
    .checkmark {
        height: 20px;
        width: 20px;
    }
    
    #back-to-top {
        width: 48px;
        height: 48px;
        bottom: 15px;
        right: 15px;
        font-size: 1.2rem;
    }
    
    .photo-preview img {
        width: 100px;
        height: 100px;
    }
}

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

/* Mobile-only alternative background color */
@media (max-width: 768px) {
    :root {
        --background-cream: #f8e8d8; /* Warm peach-cream - works on all mobiles */
    }
    
    html::before {
        background-color: #f8e8d8;
    }
    
    body {
        background-color: #f8e8d8;
    }
}

/* RTL Support - Back to Top Button */
html[dir="rtl"] #back-to-top {
    right: auto;
    left: 20px;
}

/* Mobile RTL override */
@media (max-width: 480px) {
    html[dir="rtl"] #back-to-top {
        left: 15px;
    }
}