/* ============================================================================
   Wedding Website - Optimized Stylesheet
   Color Palette: Peach/Coral theme
   ============================================================================ */

/* ============================================================================
   CSS Variables
   ============================================================================ */

:root {
    --primary-color: #e8b4a0;
    --secondary-color: #f5d5c8;
    --accent-color: #d4a574;
    --bg-light: #fff9f5;
    --bg-gradient-start: #fffaf5;
    --bg-gradient-end: #ffe8d9;
    --text-dark: #5a4a42;
    --shadow-soft: 0 5px 20px rgba(232, 180, 160, 0.15);
}

/* ============================================================================
   Base Styles
   ============================================================================ */

body {
    min-height: 100vh;
    font-family: 'Georgia', 'Playfair Display', serif;
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-attachment: fixed;
    color: var(--text-dark);
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 218, 185, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(232, 180, 160, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ============================================================================
   Typography
   ============================================================================ */

h1,
h2,
h3 {
    font-family: 'Dancing Script', 'Georgia', cursive;
    color: var(--primary-color);
    text-shadow: 1px 1px 2px rgba(212, 165, 165, 0.2);
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2rem;
}

/* ============================================================================
   Navigation
   ============================================================================ */

.navbar {
    box-shadow: 0 2px 10px rgba(232, 180, 160, 0.2);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 245, 235, 0.95) 100%) !important;
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--secondary-color);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-color) !important;
    font-family: 'Dancing Script', cursive;
    text-shadow: 2px 2px 4px rgba(232, 180, 160, 0.3);
}

.nav-link {
    font-weight: 500;
    transition: all 0.3s ease;
    color: var(--text-dark) !important;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

/* ============================================================================
   Container
   ============================================================================ */

.container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    margin-top: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-soft);
    border: 2px solid var(--secondary-color);
    position: relative;
    z-index: 1;
}

.container::before,
.container::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    opacity: 0.15;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
}

.container::before {
    top: 20px;
    left: 20px;
}

.container::after {
    bottom: 20px;
    right: 20px;
}

/* ============================================================================
   Cards
   ============================================================================ */

.card {
    border: 2px solid var(--secondary-color);
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #fff8f8 100%);
    animation: fadeIn 0.6s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(212, 165, 165, 0.25);
}

.card-header {
    border-radius: 13px 13px 0 0 !important;
    font-weight: 600;
    padding: 1.2rem 1.5rem;
    border-bottom: 2px solid var(--secondary-color) !important;
    font-family: 'Georgia', serif;
}

.card-header.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%) !important;
    color: white !important;
    border: none !important;
}

.card-header.bg-info {
    background: linear-gradient(135deg, #a8e6cf 0%, #88d8b0 100%) !important;
    color: #2d6a4f !important;
}

.card-header.bg-success {
    background: linear-gradient(135deg, #ffd3a5 0%, #fd9843 100%) !important;
    color: #8b4513 !important;
}

.card-header.bg-warning {
    background: linear-gradient(135deg, #fff9c4 0%, #fff59d 100%) !important;
    color: #f57f17 !important;
}

/* ============================================================================
   Buttons
   ============================================================================ */

.btn {
    border-radius: 25px;
    padding: 0.7rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border: 2px solid var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(212, 165, 165, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 165, 165, 0.5);
    border-color: var(--accent-color);
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* ============================================================================
   Forms
   ============================================================================ */

.form-control,
.form-select {
    border-radius: 12px;
    border: 2px solid var(--secondary-color);
    padding: 0.85rem 1.2rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.3rem rgba(212, 165, 165, 0.25);
    background: white;
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
    font-family: 'Georgia', serif;
}

/* ============================================================================
   Alerts
   ============================================================================ */

.alert {
    border-radius: 15px;
    border: 2px solid;
    box-shadow: var(--shadow-soft);
    font-family: 'Segoe UI', sans-serif;
    animation: fadeIn 0.6s ease;
}

.alert-info {
    background: linear-gradient(135deg, #e3f2fd 0%, #fce4ec 100%);
    border-color: var(--secondary-color);
    color: var(--text-dark);
}

.alert-success {
    background: linear-gradient(135deg, #f1f8e9 0%, #fff9c4 100%);
    border-color: #c5e1a5;
    color: #33691e;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-color: #ffcc80;
    color: #e65100;
}

.alert-danger {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
    border-color: #ef9a9a;
    color: #c62828;
}

/* ============================================================================
   Badges
   ============================================================================ */

.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #e8b4a0 0%, #d4a574 100%) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #a8d5ba 0%, #88c5a0 100%) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #f5d5c8 0%, #e8b4a0 100%) !important;
}

/* ============================================================================
   Gallery and Media
   ============================================================================ */

.gallery-item {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

/* Gallery Card per pagina galleria */
.gallery-card {
    cursor: pointer;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    background: white;
}

.gallery-clickable {
    cursor: pointer !important;
}

.gallery-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-card-media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    background: #f5f5f5;
}

.gallery-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-img {
    transform: scale(1.1);
}

.gallery-card-info {
    padding: 10px 12px;
    background: white;
    border-top: 1px solid #eee;
}

.gallery-list-media {
    position: relative;
    height: 250px;
    overflow: hidden;
    cursor: pointer;
}

.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    box-shadow: 0 5px 20px rgba(212, 165, 165, 0.5);
}

.video-overlay::after {
    content: '▶';
    color: white;
    font-size: 24px;
    margin-left: 4px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   Lightbox
   ============================================================================ */

.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    position: relative;
    margin: auto;
    padding: 20px;
    width: 90%;
    max-width: 1200px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox img,
.lightbox video {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.lightbox video {
    outline: none;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    color: white;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 40px;
    z-index: 10000;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 40px;
    padding: 10px 20px;
    z-index: 10000;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

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

/* Lightbox Info e Download */
.lightbox-info {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    background: rgba(0, 0, 0, 0.7);
    padding: 12px 24px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    z-index: 10001;
}

.lightbox-counter {
    color: white;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Segoe UI', sans-serif;
    min-width: 60px;
    text-align: center;
}

.lightbox-download {
    color: white;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 15px rgba(232, 180, 160, 0.4);
}

.lightbox-download:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 180, 160, 0.6);
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--primary-color) 100%);
}

.lightbox-download i {
    font-size: 18px;
}

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

footer {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 240, 240, 0.95) 100%);
    border-top: 2px solid var(--secondary-color);
    color: var(--text-dark);
    font-family: 'Georgia', serif;
}

footer p {
    margin: 0;
    font-style: italic;
}

/* ============================================================================
   Decorative Elements
   ============================================================================ */

.floral-decoration {
    position: relative;
    padding: 2rem 0;
}

.floral-decoration::before,
.floral-decoration::after {
    content: '✦';
    position: absolute;
    font-size: 1.2rem;
    opacity: 0.3;
    color: var(--accent-color);
    animation: float 3s ease-in-out infinite;
}

.floral-decoration::before {
    left: 10%;
    top: 50%;
}

.floral-decoration::after {
    right: 10%;
    top: 50%;
    animation-delay: 1.5s;
}

hr {
    border: none;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--primary-color), var(--accent-color), var(--primary-color), transparent);
    margin: 2rem 0;
    opacity: 0.5;
}

/* ============================================================================
   Lists
   ============================================================================ */

ul {
    list-style: none;
    padding-left: 0;
}

ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

ul li::before {
    content: '◆';
    position: absolute;
    left: 0;
    font-size: 0.7rem;
    color: var(--primary-color);
}

/* ============================================================================
   Utility Classes
   ============================================================================ */

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.shadow-soft {
    box-shadow: var(--shadow-soft);
}

/* ============================================================================
   Animations
   ============================================================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes float {

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

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

/* ============================================================================
   Responsive Design
   ============================================================================ */

@media (max-width: 768px) {
    .container {
        padding: 20px;
        margin-top: 1rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 8px 15px;
    }

    .lightbox-close {
        font-size: 35px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .lightbox-info {
        bottom: 20px;
        padding: 10px 16px;
        gap: 10px;
        flex-direction: column;
        border-radius: 15px;
    }

    .lightbox-counter {
        font-size: 14px;
        min-width: auto;
    }

    .lightbox-download {
        font-size: 13px;
        padding: 6px 16px;
    }

    .gallery-item img,
    .gallery-item video {
        height: 150px;
    }
    
    .gallery-list-media {
        height: 200px;
    }
    
    .gallery-card-media {
        aspect-ratio: 4/3;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .floral-decoration::before {
        left: 5%;
    }

    .floral-decoration::after {
        right: 5%;
    }
}

/* ============================================================================
   Toast Notifications
   ============================================================================ */

#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-width: 300px;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.toast-notification.hide {
    opacity: 0;
    transform: translateX(400px);
}

.toast-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    font-size: 0.95rem;
    color: #333;
    word-wrap: break-word;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px 8px;
    color: #666;
    font-size: 1rem;
    flex-shrink: 0;
    transition: color 0.2s;
    line-height: 1;
}

.toast-close:hover {
    color: #333;
}

@media (max-width: 600px) {
    #toast-container {
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .toast-notification {
        min-width: auto;
    }
}