/* =================================================================
   COMPONENTS.CSS - Reusable UI Components for All Event Pages
   
   This file contains all reusable components that can be used
   across different event types. Event-specific styling should
   go in the individual theme files (wedding.css, birthday.css, etc.)
   ================================================================= */

/* =================================================================
   HERO COMPONENT
   ================================================================= */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    text-align: center;
    padding: 2rem;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.hero-bg img,
.hero-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-names,
.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    margin-bottom: 1rem;
    line-height: 1.1;
}

.hero-date,
.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 2rem);
    margin-bottom: 0.5rem;
    opacity: 0.95;
}

.hero-location {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    opacity: 0.9;
}

/* =================================================================
   COUNTDOWN TIMER COMPONENT
   ================================================================= */

.countdown {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.countdown-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 1rem;
    border-radius: 12px;
    min-width: 80px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    text-align: center;
}

@media (min-width: 480px) {
    .countdown-item {
        padding: 1.25rem;
        min-width: 100px;
    }
}

.countdown-number {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1;
}

.countdown-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.5rem;
    opacity: 0.8;
}

/* =================================================================
   SHARE BUTTONS COMPONENT (Updated)
   ================================================================= */

.share-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
}

.share-toggle {
    background: linear-gradient(135deg, #1a1f71, #4c5fd5);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(26, 31, 113, 0.4);
    text-transform: uppercase;
    min-height: 44px;
}

.share-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(26, 31, 113, 0.6);
    background: linear-gradient(135deg, #4c5fd5, #1a1f71);
}

.share-toggle:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
}

.share-menu {
    position: absolute;
    bottom: 60px;
    right: 0;
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border-radius: 12px;
    box-shadow: 0 15px 50px rgba(0,0,0,0.2);
    padding: 8px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
    border: 1px solid rgba(0,0,0,0.08);
}

.share-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.share-option {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: #1a1f71;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    min-height: 44px;
}

.share-option:hover {
    background: linear-gradient(135deg, #1a1f71, #4c5fd5);
    color: white;
    transform: translateX(3px);
}

.share-option:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: -3px;
}

.share-option-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #1a1f71;
    border: 1px solid rgba(0,0,0,0.08);
    transition: all 0.2s;
}

.share-option:hover .share-option-icon {
    background: white;
    color: #1a1f71;
    border-color: white;
}

.share-option-text {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.share-option svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* =================================================================
   NAVIGATION COMPONENT (Event Pages)
   ================================================================= */

.elegant-nav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

/* Mobile Navigation Toggle */
.nav-mobile-toggle {
    display: block;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 1001;
    min-width: 44px;
    min-height: 44px;
}

@media (min-width: 768px) {
    .nav-mobile-toggle {
        display: none;
    }
}

.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    margin: 5px auto;
    transition: all 0.3s;
}

.nav-mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Navigation Links */
.nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 1rem;
}

.nav-links.active {
    display: block;
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        position: static;
        box-shadow: none;
        padding: 0;
        gap: 2rem;
        background: transparent;
    }
}

.nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    text-align: center;
}

@media (min-width: 768px) {
    .nav-link {
        padding: 0.5rem 1rem;
    }
    
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background: currentColor;
        transition: width 0.3s;
    }
    
    .nav-link:hover::after {
        width: 80%;
    }
}

.nav-link:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
    border-radius: 4px;
}

/* =================================================================
   TIMELINE COMPONENT
   ================================================================= */

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, transparent, currentColor 10%, currentColor 90%, transparent);
    opacity: 0.3;
}

@media (max-width: 767px) {
    .timeline::before {
        left: 30px;
    }
}

.timeline-item {
    position: relative;
    padding: 2rem 0;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.5s;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: white;
    border: 3px solid currentColor;
    border-radius: 50%;
    z-index: 1;
}

@media (max-width: 767px) {
    .timeline-dot {
        left: 30px;
    }
}

.timeline-content {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin: 0 auto;
    max-width: 400px;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: 0;
}

@media (min-width: 768px) {
    .timeline-item:nth-child(odd) .timeline-content {
        margin-right: calc(50% + 30px);
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: calc(50% + 30px);
    }
}

.timeline-content h3 {
    margin-bottom: 0.5rem;
}

.timeline-date {
    font-size: 0.875rem;
    opacity: 0.7;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* =================================================================
   CARD COMPONENTS
   ================================================================= */

/* Person Card (Wedding Party, Team, Speakers) */
.person-card {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.person-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.person-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 1rem;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid rgba(0,0,0,0.1);
}

.person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.person-name {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.person-role {
    font-size: 0.875rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.person-bio {
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0.8;
}

/* Detail Card (Event Details, Features) */
.detail-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s;
    opacity: 1;
}

.detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.detail-icon {
    margin-bottom: 1.5rem;
}

.detail-icon-wrapper,
.detail-icon-text {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.3);
}

.detail-card h3 {
    margin-bottom: 0.5rem;
}

.detail-time {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.detail-card p {
    margin-bottom: 0.25rem;
    opacity: 0.8;
}

/* Hotel/Venue Card */
.hotel-card,
.venue-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.hotel-card::before,
.venue-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.hotel-card:hover,
.venue-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 50px rgba(0,0,0,0.15);
}

.hotel-badge,
.venue-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hotel-name,
.venue-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hotel-rate,
.venue-price {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 1rem;
}

.hotel-button,
.venue-button {
    display: inline-block;
    margin-top: 1rem;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    min-height: 44px;
}

.hotel-button:hover,
.venue-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* =================================================================
   FORM COMPONENTS (RSVP, Contact, Registration)
   ================================================================= */

.event-form {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

.form-fieldset {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.form-legend {
    font-weight: 600;
    padding: 0 0.5rem;
    margin-left: -0.5rem;
}

/* Radio and Checkbox Groups */
.form-radio-group,
.form-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.form-radio-label,
.form-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.form-radio-label:hover,
.form-checkbox-label:hover {
    background: #f5f5f5;
}

input[type="radio"],
input[type="checkbox"] {
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
}

/* Form Submit Button */
.form-submit {
    width: 100%;
    padding: 14px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 48px;
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.form-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Form Messages */
.form-success-message,
.form-error-message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 500;
}

.form-success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* =================================================================
   MODAL & DROPDOWN COMPONENTS
   ================================================================= */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    padding: 2rem;
    overflow-y: auto;
}

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

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f5f5f5;
}

.modal-close:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: 2px;
}

/* Dropdown Component */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    padding: 12px 24px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    min-height: 44px;
}

.dropdown-toggle:hover {
    border-color: #667eea;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 100;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 12px 16px;
    color: inherit;
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-item:focus-visible {
    outline: 3px solid #4A90E2;
    outline-offset: -3px;
}

/* =================================================================
   FOOTER COMPONENTS
   ================================================================= */

.footer-event {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 6rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.2s;
    line-height: 1.8;
}

.footer-section a:hover {
    color: white;
}

.footer-divider {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 2rem 0;
}

.footer-bottom {
    text-align: center;
    padding: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-hashtag {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
    opacity: 0.9;
}

/* Calendar Integration in Footer */
.save-the-date-footer {
    margin-top: 2rem;
}

.btn-save-date {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 14px 30px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-height: 48px;
}

.btn-save-date:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.calendar-dropdown {
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    overflow: hidden;
}

.calendar-dropdown.show {
    opacity: 1;
    visibility: visible;
}

.calendar-option {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.calendar-option:last-child {
    border-bottom: none;
}

.calendar-option:hover {
    background: #f5f5f5;
}

/* =================================================================
   LOADING & ANIMATION COMPONENTS
   ================================================================= */

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

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

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

.slide-up {
    animation: slideUp 0.5s ease-out;
}

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

/* =================================================================
   ACCESSIBILITY ENHANCEMENTS
   ================================================================= */

/* Focus trap container */
.focus-trap {
    position: relative;
}

/* Announce to screen readers */
.sr-announce {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* High contrast mode adjustments */
@media (prefers-contrast: high) {
    .card,
    .detail-card,
    .person-card,
    .hotel-card {
        border: 2px solid currentColor;
    }
    
    .btn,
    .form-submit {
        border: 2px solid currentColor;
    }
}

/* Reduced motion adjustments */
@media (prefers-reduced-motion: reduce) {
    .card,
    .detail-card,
    .person-card,
    .timeline-item,
    .modal,
    .dropdown-menu {
        transition: none !important;
        animation: none !important;
    }
}

/* =================================================================
   RESPONSIVE UTILITIES
   ================================================================= */

/* Hide on mobile, show on desktop */
@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }
}

/* Hide on desktop, show on mobile */
@media (min-width: 768px) {
    .mobile-only {
        display: none !important;
    }
}

/* Stack on mobile */
@media (max-width: 767px) {
    .stack-mobile {
        flex-direction: column !important;
    }
    
    .stack-mobile > * {
        width: 100% !important;
    }
}