/* Custom Styles for Casey & Cheryl Wedding Website */

/* Custom Wedding Font */
@font-face {
    font-family: 'Wedding';
    src: url('wedding.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

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

body {
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

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

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

/* Disco color cycling animation */
@keyframes discoColorCycle {
    0% {
        filter: hue-rotate(0deg) saturate(1.5) brightness(1.1);
    }
    25% {
        filter: hue-rotate(90deg) saturate(1.8) brightness(1.2);
    }
    50% {
        filter: hue-rotate(180deg) saturate(1.5) brightness(1.1);
    }
    75% {
        filter: hue-rotate(270deg) saturate(1.8) brightness(1.2);
    }
    100% {
        filter: hue-rotate(360deg) saturate(1.5) brightness(1.1);
    }
}

.disco-cycle {
    animation: discoColorCycle 15s ease-in-out infinite;
    will-change: filter;
}

.fade-in {
    animation: fadeIn 1s ease-in;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Scroll animations - instant appearance */
.timeline-item,
.detail-card,
.activity-card,
.travel-card,
.faq-item {
    transition: none;
    opacity: 1 !important;
}

/* Navigation Active State */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link.active {
    color: #5f7360;
    font-weight: 600;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #5f7360;
}

/* Hero Section Enhancements */
#home {
    position: relative;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(95, 115, 96, 0.1) 0%, rgba(212, 196, 174, 0.2) 100%);
    z-index: 1;
}

/* Countdown Styling */
#countdown {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Form Styling Enhancements */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

input[type="radio"] {
    accent-color: #5f7360;
}

/* FAQ Accordion */
.faq-item {
    overflow: hidden;
    border: none !important;
}

.faq-question {
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none !important;
    outline: none !important;
}

.faq-question:hover {
    background-color: #f6f7f6;
}

.faq-question:focus {
    outline: none !important;
    box-shadow: none !important;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.4s ease-out;
    opacity: 0;
    border: none !important;
}

.faq-answer p {
    border: none !important;
    margin: 0;
    padding: 0;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    opacity: 1;
    transition: max-height 0.4s ease-in, opacity 0.4s ease-in;
}

/* Registry Link Hover Effects */
.registry-link {
    transition: all 0.3s ease;
}

.registry-link:hover {
    transform: scale(1.05) translateY(-5px);
}

/* Section Dividers */
section {
    position: relative;
}

/* Mobile Menu Transitions */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu.show {
    display: block !important;
    animation: fadeInUp 0.3s ease;
}

/* Ensure mobile menu is hidden on desktop */
@media (min-width: 768px) {
    #mobile-menu {
        display: none !important;
    }
}

/* Timeline Design - Circles overlaid on card corners with connecting line */
.timeline-item {
    position: relative;
}

@media (min-width: 768px) {
    /* Vertical line connecting circles - perfectly centered through corner circles */
    .timeline-item:not(:last-child)::after {
        content: '';
        position: absolute;
        left: -0.05rem;
        top: 1.5rem;
        width: 3px;
        height: calc(100% + 4rem - 1.5rem);
        background: linear-gradient(to bottom, #14b8a6, #2dd4bf);
        z-index: 5;
    }
}

/* Card Hover Effects */
.detail-card,
.activity-card,
.travel-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detail-card:hover,
.activity-card:hover,
.travel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Navbar Scroll Effect */
#navbar {
    transition: all 0.3s ease;
}

#navbar.scrolled {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Loading Animation for Images */
img {
    transition: opacity 0.3s ease;
}

img[data-loaded="false"] {
    opacity: 0;
}

img[data-loaded="true"] {
    opacity: 1;
}

/* Gradient Text Effect for Hero */
#home h1 {
    background: linear-gradient(135deg, #3d4a3e 0%, #5f7360 50%, #7a8e7a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Responsive Typography */
@media (max-width: 768px) {
    #home h1 {
        font-size: 3rem;
    }

    #countdown {
        flex-wrap: wrap;
    }

    #countdown > div {
        margin-bottom: 1rem;
    }
}

/* Print Styles */
@media print {
    #navbar,
    #countdown,
    footer {
        display: none;
    }

    section {
        page-break-inside: avoid;
    }
}

/* Button Ripple Effect */
button,
.btn,
a[class*="bg-"] {
    position: relative;
    overflow: hidden;
}

button::after,
.btn::after,
a[class*="bg-"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:active::after,
.btn:active::after,
a[class*="bg-"]:active::after {
    width: 300px;
    height: 300px;
}

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

::-webkit-scrollbar-track {
    background: #faf8f5;
}

::-webkit-scrollbar-thumb {
    background: #a3b0a3;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7a8e7a;
}

/* Selection Color */
::selection {
    background-color: #a3b0a3;
    color: white;
}

::-moz-selection {
    background-color: #a3b0a3;
    color: white;
}

/* Utility Classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* Activity Card Icon Hover */
.activity-card svg {
    transition: transform 0.3s ease;
}

.activity-card:hover svg {
    transform: scale(1.1) rotate(5deg);
}

/* Success/Error Message Styling */
.success-message {
    color: #10b981;
    background-color: #d1fae5;
    border: 1px solid #10b981;
    padding: 1rem;
    border-radius: 0.5rem;
}

.error-message {
    color: #ef4444;
    background-color: #fee2e2;
    border: 1px solid #ef4444;
    padding: 1rem;
    border-radius: 0.5rem;
}

/* Accessibility Improvements */
a:focus,
button:focus {
    outline: 2px solid #5f7360;
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
