/**
 * Abbotts Events - Custom Styles
 * Complementary styles for Tailwind CSS
 */

/* ============================================
   Base Styles & Resets
   ============================================ */

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid hsl(25, 40%, 45%);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* ============================================
   Section Padding Utilities
   ============================================ */

.section-padding {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-padding {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

@media (min-width: 1024px) {
    .section-padding {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }
}

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

.container-narrow {
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

.container-wide {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container-narrow,
    .container-wide {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-narrow,
    .container-wide {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* ============================================
   Hover Effects
   ============================================ */

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Border & Glass Effects
   ============================================ */

.elegant-border {
    border: 1px solid hsl(30, 10%, 90%);
    transition: border-color 0.3s ease;
}

.elegant-border:hover {
    border-color: hsl(25, 40%, 45%, 0.3);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.5s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease-out forwards;
}

/* Animation delays */
.animation-delay-100 {
    animation-delay: 100ms;
}

.animation-delay-200 {
    animation-delay: 200ms;
}

.animation-delay-300 {
    animation-delay: 300ms;
}

.animation-delay-400 {
    animation-delay: 400ms;
}

.animation-delay-500 {
    animation-delay: 500ms;
}

/* ============================================
   Accordion Styles
   ============================================ */

[data-accordion-content] {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

[data-accordion-icon] {
    transition: transform 0.3s ease;
}

[data-accordion-item].open [data-accordion-icon] {
    transform: rotate(180deg);
}

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

#gallery-lightbox {
    transition: opacity 0.3s ease;
}

#lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
}

/* ============================================
   Cookie Banner
   ============================================ */

#cookie-banner {
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* ============================================
   Mobile Menu
   ============================================ */

#mobile-menu {
    transition: transform 0.3s ease;
}

#mobile-menu-overlay {
    transition: opacity 0.3s ease;
}

/* ============================================
   Form Styles
   ============================================ */

input:focus,
textarea:focus,
select:focus {
    border-color: hsl(25, 40%, 45%);
    box-shadow: 0 0 0 3px hsla(25, 40%, 45%, 0.1);
}

/* Custom checkbox/radio styling */
input[type="checkbox"],
input[type="radio"] {
    accent-color: hsl(25, 40%, 45%);
}

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

.prose {
    color: hsl(30, 10%, 40%);
    line-height: 1.75;
}

.prose h2 {
    color: hsl(30, 10%, 15%);
    margin-top: 2em;
    margin-bottom: 1em;
}

.prose h3 {
    color: hsl(30, 10%, 15%);
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.prose a {
    color: hsl(25, 40%, 45%);
    text-decoration: underline;
}

.prose a:hover {
    color: hsl(25, 40%, 35%);
}

.prose ul,
.prose ol {
    margin-top: 1em;
    margin-bottom: 1em;
    padding-left: 1.5em;
}

.prose li {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* ============================================
   Scrollbar Styling
   ============================================ */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: hsl(30, 10%, 95%);
}

::-webkit-scrollbar-thumb {
    background: hsl(30, 10%, 70%);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: hsl(30, 10%, 60%);
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
    .no-print,
    #cookie-banner,
    #mobile-menu,
    #mobile-menu-overlay {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }
}

/* ============================================
   Selection Styling
   ============================================ */

::selection {
    background-color: hsl(25, 40%, 45%);
    color: white;
}

::-moz-selection {
    background-color: hsl(25, 40%, 45%);
    color: white;
}

/* ============================================
   Image Loading Placeholder
   ============================================ */

.img-loading {
    background: linear-gradient(
        90deg,
        hsl(30, 10%, 92%) 0%,
        hsl(30, 10%, 96%) 50%,
        hsl(30, 10%, 92%) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* ============================================
   Responsive Images
   ============================================ */

.responsive-img {
    width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Skip Link (Accessibility)
   ============================================ */

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: hsl(30, 10%, 18%);
    color: white;
    padding: 8px 16px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}
