/*
 * Mücahit & Ayşe — Düğün Websitesi
 * Design System: Tokens, Reset, Typography, Components, Animations, Utilities
 * Rose Gold + Ivory + Champagne + Sage teması
 */

/* ============================================================
   Google Fonts Import
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&display=swap');

/* ============================================================
   Design Tokens (CSS Custom Properties)
   ============================================================ */
:root {
    /* Renk Paleti */
    --color-primary: #B76E79;
    --color-primary-light: #F4E1E1;
    --color-primary-lighter: #FDF0F0;
    --color-primary-dark: #8B4A52;
    --color-primary-darker: #6B3640;
    --color-secondary: #D4A574;
    --color-secondary-light: #E8CEB0;
    --color-accent: #87A08B;
    --color-accent-light: #C5D6C8;
    --color-accent-dark: #6B8370;
    --color-background: #FDF8F4;
    --color-background-alt: #FAF5F0;
    --color-surface: #FFFFFF;
    --color-surface-elevated: #FFFFFF;
    --color-text-primary: #2C2C2C;
    --color-text-secondary: #6B6B6B;
    --color-text-tertiary: #9B9B9B;
    --color-text-on-primary: #FFFFFF;
    --color-text-on-dark: #F5F5F5;
    --color-overlay: rgba(44, 44, 44, 0.55);
    --color-overlay-light: rgba(255, 255, 255, 0.15);
    --color-border: #E8DDD5;
    --color-border-light: #F0E8E0;
    --color-success: #6B9E6B;
    --color-error: #C75050;
    --color-warning: #D4A030;

    /* Tipografi */
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-accent: 'Great Vibes', cursive;

    /* Font Boyutları */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;

    /* Satır Yükseklikleri */
    --leading-tight: 1.1;
    --leading-snug: 1.3;
    --leading-normal: 1.6;
    --leading-relaxed: 1.75;

    /* Aralıklar */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    --space-5xl: 8rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    --radius-full: 9999px;

    /* Gölgeler */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.16);
    --shadow-glow: 0 0 20px rgba(183, 110, 121, 0.25);
    --shadow-glow-strong: 0 0 30px rgba(183, 110, 121, 0.4);

    /* Geçişler */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
    --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-Index Katmanları */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-toast: 500;
    --z-max: 9999;

    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.12);
    --glass-bg-strong: rgba(255, 255, 255, 0.2);
    --glass-border: rgba(255, 255, 255, 0.25);
    --glass-blur: blur(16px);
    --glass-blur-strong: blur(24px);
}

/* ============================================================
   CSS Reset
   ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 400;
    line-height: var(--leading-normal);
    color: var(--color-text-primary);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-primary-dark);
}

ul,
ol {
    list-style: none;
}

button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    border: none;
    outline: none;
    background: none;
}

button {
    cursor: pointer;
}

/* ============================================================
   Typography
   ============================================================ */
.font-display {
    font-family: var(--font-display);
}

.font-accent {
    font-family: var(--font-accent);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: var(--leading-tight);
    color: var(--color-text-primary);
}

h1 {
    font-size: var(--text-5xl);
}

h2 {
    font-size: var(--text-4xl);
}

h3 {
    font-size: var(--text-3xl);
}

h4 {
    font-size: var(--text-2xl);
}

h5 {
    font-size: var(--text-xl);
}

h6 {
    font-size: var(--text-lg);
}

.text-gradient {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.85rem 2rem;
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: 500;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.btn:hover::after {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-text-on-primary);
    box-shadow: var(--shadow-md), 0 0 0 0 rgba(183, 110, 121, 0);
}

.btn-primary:hover {
    color: var(--color-text-on-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-text-on-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    color: var(--color-text-on-dark);
}

.btn-glass:hover {
    background: var(--glass-bg-strong);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--color-text-on-dark);
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: var(--text-sm);
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: 1.1rem 2.5rem;
    font-size: var(--text-lg);
    border-radius: var(--radius-xl);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-full);
    font-size: var(--text-lg);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ============================================================
   Cards
   ============================================================ */
.card {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-base);
    padding: 40px;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-glass {
    background: var(--glass-bg-strong);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    transition: all var(--transition-base);
}

.card-glass:hover {
    background: rgba(255, 255, 255, 0.28);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-body {
    padding: var(--space-xl);
}

/* ============================================================
   Forms
   ============================================================ */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: var(--text-base);
    color: var(--color-text-primary);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(183, 110, 121, 0.15);
}

.form-control::placeholder {
    color: var(--color-text-tertiary);
}

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

/* ============================================================
   Container & Layout
   ============================================================ */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-sm {
    max-width: 800px;
}

.container-lg {
    max-width: 1400px;
}

.section {
    padding: var(--space-4xl) 0;
}

/* ============================================================
   Navigation (Public)
   ============================================================ */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky);
    padding: var(--space-md) var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all var(--transition-slow);
}

.site-nav.scrolled {
    background: rgba(253, 248, 244, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.nav-logo {
    font-family: var(--font-accent);
    font-size: var(--text-2xl);
    color: var(--color-text-on-dark);
    transition: color var(--transition-base);
}

.site-nav.scrolled .nav-logo {
    color: var(--color-primary);
}

.nav-admin-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-sm);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

.nav-admin-link:hover {
    color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.1);
}

.site-nav.scrolled .nav-admin-link {
    color: var(--color-text-tertiary);
}

.site-nav.scrolled .nav-admin-link:hover {
    color: var(--color-primary);
    background: var(--color-primary-lighter);
}

/* ============================================================
   Back Button (Sub-pages)
   ============================================================ */
.back-btn {
    position: fixed;
    top: var(--space-lg);
    left: var(--space-lg);
    z-index: var(--z-sticky);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    color: var(--color-text-primary);
    font-size: var(--text-lg);
    transition: all var(--transition-base);
    text-decoration: none;
}

.back-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
    color: var(--color-primary);
}

/* ============================================================
   Loading Spinner (İç İçe Yüzükler)
   ============================================================ */
.spinner-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(253, 248, 244, 0.9);
    z-index: var(--z-max);
    opacity: 1;
    transition: opacity var(--transition-slow);
}

.spinner-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.wedding-spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

.wedding-spinner .ring {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid transparent;
    border-radius: 50%;
}

.wedding-spinner .ring-1 {
    top: 15px;
    left: 0;
    border-color: var(--color-primary);
    animation: spin-ring-1 1.4s ease-in-out infinite;
}

.wedding-spinner .ring-2 {
    top: 15px;
    left: 28px;
    border-color: var(--color-secondary);
    animation: spin-ring-2 1.4s ease-in-out infinite;
}

@keyframes spin-ring-1 {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(180deg) scale(1.05);
    }
}

@keyframes spin-ring-2 {

    0%,
    100% {
        transform: rotate(0deg) scale(1);
    }

    50% {
        transform: rotate(-180deg) scale(1.05);
    }
}

/* ============================================================
   Lightbox
   ============================================================ */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: var(--z-modal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    cursor: default;
    animation: lightbox-zoom-in 0.3s ease;
}

.lightbox-close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    color: white;
    font-size: var(--text-xl);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-full);
    color: white;
    font-size: var(--text-xl);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: var(--space-lg);
}

.lightbox-next {
    right: var(--space-lg);
}

@keyframes lightbox-zoom-in {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================================
   Toast / Notification
   ============================================================ */
.toast-container {
    position: fixed;
    top: var(--space-xl);
    right: var(--space-xl);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border-left: 4px solid var(--color-primary);
    animation: toast-slide-in 0.4s var(--transition-spring);
    min-width: 300px;
    max-width: 450px;
}

.toast.toast-success {
    border-left-color: var(--color-success);
}

.toast.toast-error {
    border-left-color: var(--color-error);
}

.toast.toast-warning {
    border-left-color: var(--color-warning);
}

.toast-message {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--color-text-primary);
}

.toast-close {
    color: var(--color-text-tertiary);
    cursor: pointer;
    font-size: var(--text-lg);
    transition: color var(--transition-fast);
}

.toast-close:hover {
    color: var(--color-text-primary);
}

@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============================================================
   Progress Bar
   ============================================================ */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--color-border-light);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-primary));
    background-size: 200% 100%;
    animation: progress-shimmer 2s linear infinite;
    transition: width var(--transition-base);
}

@keyframes progress-shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ============================================================
   Konfeti Animasyonu
   ============================================================ */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: var(--z-toast);
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -10px;
    opacity: 0;
    animation: confetti-fall 3s ease-in forwards;
}

@keyframes confetti-fall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0deg) scale(1);
    }

    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg) scale(0.5);
    }
}

/* ============================================================
   Fade-In Animasyonları
   ============================================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

.fade-in-delay-1 {
    animation-delay: 0.1s;
}

.fade-in-delay-2 {
    animation-delay: 0.2s;
}

.fade-in-delay-3 {
    animation-delay: 0.3s;
}

.fade-in-delay-4 {
    animation-delay: 0.4s;
}

.fade-in-delay-5 {
    animation-delay: 0.5s;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* ============================================================
   Scrollbar Stillemesi
   ============================================================ */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-background);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary-light);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ============================================================
   Utility Classes
   ============================================================ */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--color-primary);
}

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

.text-muted {
    color: var(--color-text-tertiary);
}

.text-white {
    color: white;
}

.mt-1 {
    margin-top: var(--space-sm);
}

.mt-2 {
    margin-top: var(--space-md);
}

.mt-3 {
    margin-top: var(--space-lg);
}

.mt-4 {
    margin-top: var(--space-xl);
}

.mb-1 {
    margin-bottom: var(--space-sm);
}

.mb-2 {
    margin-bottom: var(--space-md);
}

.mb-3 {
    margin-bottom: var(--space-lg);
}

.mb-4 {
    margin-bottom: var(--space-xl);
}

.d-flex {
    display: flex;
}

.d-grid {
    display: grid;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 {
    gap: var(--space-sm);
}

.gap-2 {
    gap: var(--space-md);
}

.gap-3 {
    gap: var(--space-lg);
}

.gap-4 {
    gap: var(--space-xl);
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.rounded {
    border-radius: var(--radius-lg);
}

.rounded-full {
    border-radius: var(--radius-full);
}

.overflow-hidden {
    overflow: hidden;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ============================================================
   Responsive Breakpoints
   ============================================================ */

/* Tablet */
@media (max-width: 992px) {
    :root {
        --text-5xl: 2.5rem;
        --text-6xl: 3rem;
        --text-7xl: 3.5rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .section {
        padding: var(--space-3xl) 0;
    }
}

/* Mobil */
@media (max-width: 576px) {
    :root {
        --text-4xl: 1.875rem;
        --text-5xl: 2rem;
        --text-6xl: 2.5rem;
        --text-7xl: 2.75rem;
    }

    html {
        font-size: 15px;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .btn {
        padding: 0.75rem 1.5rem;
    }

    .btn-lg {
        padding: 0.85rem 2rem;
        font-size: var(--text-base);
    }

    .toast-container {
        top: var(--space-md);
        right: var(--space-md);
        left: var(--space-md);
    }

    .toast {
        min-width: unset;
        max-width: unset;
    }

    .back-btn {
        top: var(--space-md);
        left: var(--space-md);
    }
}