/* ========================= */
/*   Variables & Reset        */
/* ========================= */

:root {
    --gold: #C7A86B;
    --gold-dark: #b39458;
    --gold-light: #e8d5a8;
    --bg: #FFFDF9;
    --bg-card: #ffffff;
    --text: #5b4a42;
    --text-light: #8a7a72;
    --text-muted: #aaa;
    --border: #eadfd7;
    --input-bg: #FCFAF8;
    --rose: #d88a9c;
    --rose-light: #f0c4cf;
    --shadow: rgba(180, 150, 120, 0.12);
    --shadow-lg: rgba(180, 150, 120, 0.2);
    --radius: 16px;
    --radius-lg: 24px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Cairo', 'Tajawal', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    direction: rtl;
    font-family: var(--font);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ========================= */
/*   Floating Hearts BG      */
/* ========================= */

.floating-hearts {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.floating-heart {
    position: absolute;
    font-size: 18px;
    opacity: 0.08;
    animation: floatHeart linear infinite;
}

@keyframes floatHeart {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.08;
    }
    90% {
        opacity: 0.08;
    }
    100% {
        transform: translateY(-10vh) rotate(360deg);
        opacity: 0;
    }
}

/* ========================= */
/*   Hero Section             */
/* ========================= */

.hero {
    width: 100%;
    height: 85vh;
    min-height: 500px;
    background: url("../assets/2.png") center center/cover no-repeat;
    position: relative;
    z-index: 2;
    pointer-events: none;
}

.overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(90, 60, 40, 0.15) 0%,
        rgba(90, 60, 40, 0.4) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1.2s ease-out;
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.overlay h1 {
    color: white;
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 0 4px 25px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

.heart-icon {
    color: var(--gold-light);
    display: inline-block;
    animation: heartPulse 2s ease-in-out infinite;
}

.hero-date {
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.15rem;
    font-weight: 300;
    letter-spacing: 3px;
}

.scroll-indicator {
    margin-top: 50px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    animation: fadeInUp 1.5s ease-out 0.5s both;
}

.scroll-arrow {
    margin-top: 8px;
    font-size: 1.2rem;
    animation: bounce 2s infinite;
}

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

@keyframes heartPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(10px); }
    60% { transform: translateY(5px); }
}

/* ========================= */
/*   Form Section             */
/* ========================= */

.form-section {
    position: relative;
    z-index: 1;
    padding: 60px 20px 40px;
    margin-top: -100px;
}

.card {
    max-width: 700px;
    margin: auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 45px 40px;
    box-shadow:
        0 20px 60px var(--shadow),
        0 1px 3px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(234, 223, 215, 0.5);
    animation: cardIn 0.8s ease-out;
}

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

.card-header {
    text-align: center;
    margin-bottom: 35px;
}

.card-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.card-header h2 {
    color: #8B6B61;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.card-header p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.8;
}

/* ========================= */
/*   Inputs                   */
/* ========================= */

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

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

input[type="text"],
textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    font-size: 15px;
    font-family: var(--font);
    background: var(--input-bg);
    color: var(--text);
    transition: var(--transition);
}

input[type="text"]:focus,
textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(199, 168, 107, 0.15);
    background: white;
}

textarea {
    resize: none;
    line-height: 1.8;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* ========================= */
/*   Upload Box               */
/* ========================= */

.upload-box {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--input-bg);
    padding: 35px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.upload-box:hover {
    border-color: var(--gold);
    background: #faf6ef;
    transform: translateY(-2px);
}

.upload-box input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.upload-content {
    pointer-events: none;
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.upload-box h3 {
    color: #8B6B61;
    margin-bottom: 6px;
    font-size: 1rem;
}

.upload-box p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ========================= */
/*   Photo Preview            */
/* ========================= */

#photoCount {
    margin: 12px 0;
    color: var(--gold-dark);
    font-weight: 600;
    font-size: 0.9rem;
}

#photoPreview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.preview-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 1;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.preview-card img,
.preview-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.remove-btn {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    min-width: auto;
    transition: var(--transition);
}

.remove-btn:hover {
    background: rgba(220, 50, 50, 0.8);
    transform: none;
}

/* ========================= */
/*   Submit Button            */
/* ========================= */

button[type="submit"] {
    width: 100%;
    margin-top: 28px;
    padding: 16px;
    border: none;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    color: white;
    font-size: 17px;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(199, 168, 107, 0.3);
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.15));
    opacity: 0;
    transition: var(--transition);
}

button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(199, 168, 107, 0.4);
}

button[type="submit"]:hover::before {
    opacity: 1;
}

button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ========================= */
/*   Success State            */
/* ========================= */

.success {
    text-align: center;
    padding: 50px 20px;
    animation: fadeInUp 0.6s ease-out;
}

.success .heart {
    font-size: 70px;
    color: var(--rose);
    animation: heartPulse 1.5s infinite;
}

.success h2 {
    color: #8B6B61;
    margin: 20px 0 10px;
    font-size: 1.6rem;
}

.success p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.8;
}

/* ========================= */
/*   Loading Spinner          */
/* ========================= */

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-left: 8px;
}

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

/* ========================= */
/*   Footer                   */
/* ========================= */

footer {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

/* ========================= */
/*   Mobile Responsive        */
/* ========================= */

@media (max-width: 768px) {

    .hero {
        height: 70vh;
        min-height: 400px;
        background: url("../assets/wedimg.jpg") center bottom/cover no-repeat;
    }

    .overlay h1 {
        font-size: 2.4rem;
    }

    .hero-date {
        font-size: 1rem;
    }

    .card {
        padding: 28px 22px;
        border-radius: 20px;
    }

    .input-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .card-header h2 {
        font-size: 1.25rem;
    }

    .upload-box {
        padding: 25px 15px;
    }

    #photoPreview {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

@media (max-width: 480px) {

    .hero {
        height: 60vh;
    }

    .overlay h1 {
        font-size: 2rem;
    }

    .card {
        padding: 22px 16px;
    }
}