/* Wedding-themed styles for Dasma Kosove */
/* Google Fonts are loaded conditionally in base.html based on cookie consent (GDPR).
   System-font fallbacks are defined in the CSS variables below so the site
   renders correctly even when fonts are not loaded from Google servers. */

/* Root variables for elegant wedding theme */
:root {
    --primary-color: #c9a961; /* Elegant gold */
    --secondary-color: #6b6b6b; /* Sophisticated gray */
    --success-color: #7fb069; /* Sage green */
    --danger-color: #dc3545;
    --warning-color: #f4c430; /* Golden */
    --info-color: #708090; /* Slate gray */
    --light-color: #faf8f5; /* Ivory */
    --dark-color: #2c3e50; /* Navy charcoal */
    --accent-color: #f5f1e8; /* Warm cream */
    --neutral-color: #8d7b68; /* Warm taupe */
    --border-radius: 0.5rem;
    --box-shadow: 0 4px 12px rgba(201, 169, 97, 0.15);
    --box-shadow-lg: 0 8px 32px rgba(201, 169, 97, 0.25);
    --elegant-font: 'Playfair Display', serif;
    --body-font: 'Inter', sans-serif;
}

/* Body and general styles */
body {
    font-family: var(--body-font);
    line-height: 1.6;
    background-color: #ffffff !important;
    color: var(--dark-color);
}

/* Elegant headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--elegant-font);
    font-weight: 600;
    color: var(--dark-color) !important;
}

/* Specific heading colors for vendor detail pages */
.card-body h5 {
    color: var(--dark-color) !important;
}

/* Ensure all text is readable on white background */
.card-body, 
.card-text,
.contact-info {
    color: var(--dark-color) !important;
}

.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--elegant-font);
    font-weight: 700;
}

/* Wedding-themed hero section */
.hero-section {
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 50%, var(--primary-color) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M40 25l5 15h15l-12 9 5 15-13-10-13 10 5-15-12-9h15z'/%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3Ccircle cx='60' cy='60' r='2'/%3E%3Ccircle cx='20' cy='60' r='2'/%3E%3Ccircle cx='60' cy='20' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.6;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% { transform: rotate(0deg) translate(-20px, -20px) rotate(0deg); }
    50% { transform: rotate(180deg) translate(-20px, -20px) rotate(-180deg); }
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

/* Headings inside hero sections must be white — overrides the global dark rule */
.hero-section h1, .hero-section h2, .hero-section h3,
.hero-section h4, .hero-section h5, .hero-section h6 {
    color: #fff !important;
}

/* Card enhancements */
.vendor-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    background: linear-gradient(180deg, #faf8f3 0%, #fff 100%);
}

.vendor-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.category-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(201, 169, 97, 0.2);
    background: linear-gradient(145deg, #ffffff 0%, var(--accent-color) 100%);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(201, 169, 97, 0.1) 50%, transparent 100%);
    transition: left 0.5s ease;
}

.category-card:hover {
    transform: translateY(-3px) scale(1.02);
    background: linear-gradient(145deg, var(--accent-color) 0%, #ffffff 100%);
    border-color: var(--primary-color);
    text-decoration: none;
}

.category-card:hover::before {
    left: 100%;
}

/* Vendor contact information */
.vendor-contact {
    font-size: 0.875rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-info i {
    width: 20px;
    text-align: center;
}

/* Form enhancements */
.form-label.required::after {
    content: ' *';
    color: var(--danger-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(201, 169, 97, 0.25);
}

/* Wedding-themed navigation */
.navbar {
    background: linear-gradient(90deg, var(--dark-color) 0%, var(--secondary-color) 50%, var(--primary-color) 100%) !important;
    box-shadow: 0 2px 20px rgba(44, 62, 80, 0.3);
    border-bottom: 3px solid var(--primary-color);
    padding: 1rem 0;
    position: relative;
    z-index: 1025;
}

.navbar-brand {
    font-family: var(--elegant-font);
    font-weight: 700;
    font-size: 1.8rem;
    color: #ffffff !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.wedding-brand {
    display: flex;
    align-items: center;
}

.wedding-brand i {
    animation: gentle-spin 4s linear infinite;
    filter: drop-shadow(0 0 5px rgba(201, 169, 97, 0.4));
    font-size: 1.5rem;
}

.brand-text {
    font-family: var(--elegant-font);
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(45deg, #ffffff, var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand-tagline {
    font-family: var(--elegant-font);
    font-style: italic;
    color: rgba(255,255,255,0.9) !important;
    font-weight: 400;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

@keyframes gentle-spin {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

.nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

/* Modal auth tabs must be dark — override navbar white */
#authTabs .nav-link {
    color: #495057 !important;
    font-weight: 500;
}
#authTabs .nav-link.active {
    color: #2c3e50 !important;
    font-weight: 600;
}
#authTabs .nav-link:hover {
    color: #2c3e50 !important;
    transform: none;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: #ffffff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover {
    color: #ffffff !important;
    transform: translateY(-1px);
}

.nav-link:hover::after {
    width: 100%;
}

@keyframes heartbeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

/* Wedding-themed decorative elements */
.wedding-accent {
    position: relative;
}

.wedding-accent::before {
    content: '♦';
    color: var(--primary-color);
    font-size: 0.8rem;
    margin-right: 0.5rem;
    opacity: 0.7;
}

/* Elegant section dividers */
.section-divider {
    text-align: center;
    margin: 3rem 0;
    position: relative;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--primary-color) 20%, var(--primary-color) 80%, transparent 100%);
}

.section-divider .divider-icon {
    background: var(--light-color);
    padding: 0 1rem;
    color: var(--primary-color);
    font-size: 1.5rem;
}

/* Romantic card styling */
.elegant-card {
    background: linear-gradient(145deg, #ffffff 0%, var(--accent-color) 100%);
    border: 1px solid rgba(201, 169, 97, 0.2);
    position: relative;
    overflow: hidden;
}

.elegant-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    opacity: 0.1;
    transform: translate(50%, -50%);
}

/* Alert enhancements */
.alert {
    border: none;
    border-radius: var(--border-radius);
}

/* Override Bootstrap primary colors with wedding theme */
.bg-primary {
    background-color: var(--primary-color) !important;
}

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

.text-info {
    color: var(--info-color) !important;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Improve link visibility */
a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    color: var(--dark-color);
    text-decoration: none;
}

/* Fix contact link hover issues */
.contact-info a[href^="tel:"],
.contact-info a[href^="mailto:"] {
    color: var(--dark-color) !important;
    text-decoration: none !important;
}

.contact-info a[href^="tel:"]:hover,
.contact-info a[href^="mailto:"]:hover {
    color: var(--primary-color) !important;
    text-decoration: none !important;
    background-color: transparent !important;
}

/* Better social media button hover effects */
footer .social-links a {
    color: rgba(255,255,255,0.8) !important;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

footer .social-links a:hover {
    color: var(--primary-color) !important;
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px) scale(1.1);
}

/* Wedding-themed buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: var(--body-font);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--neutral-color) 100%);
    border: none;
    box-shadow: 0 4px 15px rgba(201, 169, 97, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--neutral-color) 0%, var(--primary-color) 100%);
    box-shadow: 0 6px 25px rgba(201, 169, 97, 0.4);
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

/* Elegant button with shine effect */
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.2) 50%, transparent 100%);
    transition: left 0.5s ease;
}

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

/* Badge enhancements */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Table enhancements */
.table {
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: rgba(201, 169, 97, 0.075);
}

/* Modal enhancements */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: var(--light-color);
}

/* Wedding-themed footer */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, var(--dark-color) 0%, var(--secondary-color) 100%) !important;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 50%, var(--primary-color) 100%);
}

footer h5 {
    font-family: var(--elegant-font);
    font-weight: 600;
    color: #ffffff !important;
}

footer p {
    color: rgba(255,255,255,0.8);
}

footer .text-light {
    color: rgba(255,255,255,0.9) !important;
}

/* Responsive enhancements */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-section .display-4 {
        font-size: 2rem;
    }
    
    .vendor-card {
        margin-bottom: 1.5rem;
    }
    
    .table-responsive {
        font-size: 0.875rem;
    }
}

/* Loading animations */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

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

/* Accessibility enhancements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
a:focus,
button:focus,
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .vendor-card:hover,
    .category-card:hover,
    .btn:hover {
        transform: none;
    }
}

/* Premium Slider Styles */
.premium-slider {
    position: relative;
    z-index: 10;
}

.premium-slide {
    aspect-ratio: 16 / 9;
    max-height: 600px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Note: Overlay is now handled individually per slide via inline styles */

.premium-slide .container {
    position: relative;
    z-index: 2;
}

.premium-slide h2 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-family: var(--elegant-font);
}

/* Slide title/text colours are passed via CSS custom properties set
   per-slide in the inline style of .premium-slide. The !important here
   wins over the global "h1, h2 … { color: var(--dark-color) !important }"
   rule because .premium-slide h2 is more specific than the bare h2 selector. */
.premium-slide h2.slide-title {
    color: var(--slide-title-color, #ffffff) !important;
}

.premium-slide p.slide-desc {
    color: var(--slide-text-color, #ffffff) !important;
}

/* Vendor slider edit live-preview — same technique to beat the global h3 rule */
.slider-preview-title {
    color: var(--preview-title-color, #ffffff) !important;
}

.slider-preview-desc {
    color: var(--preview-text-color, #ffffff) !important;
}

.premium-slide p {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-control-prev,
.carousel-control-next {
    width: 8%;
    background: linear-gradient(90deg, rgba(0,0,0,0.3) 0%, transparent 100%);
}

.carousel-control-next {
    background: linear-gradient(-90deg, rgba(0,0,0,0.3) 0%, transparent 100%);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2rem;
    height: 2rem;
    background-size: 100% 100%;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.5));
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: transparent;
    margin: 0 3px;
    opacity: 0.7;
}

.carousel-indicators [data-bs-target].active {
    background: var(--primary-color);
    opacity: 1;
    transform: scale(1.1);
}

/* Dark mode support disabled - force light theme */
/* @media (prefers-color-scheme: dark) {
    :root {
        --light-color: #343a40;
        --dark-color: #f8f9fa;
    }
} */

/* Mobile responsiveness for slider */
@media (max-width: 768px) {
    .premium-slide {
        aspect-ratio: 16 / 9;
        max-height: 300px;
    }

    .premium-slide h2 {
        font-size: 1.5rem;
    }

    /* Limit description to 2 lines on tablet/mobile */
    .premium-slide p.slide-desc,
    .carousel-caption p.lead {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 0.75rem;
    }
}

/* Very small screens: hide description entirely, keep title + button */
@media (max-width: 480px) {
    .premium-slide p.slide-desc,
    .carousel-caption p.lead {
        display: none !important;
    }

    .premium-slide h2 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem !important;
    }
}
