/* Custom CSS for Pena Palace Website */

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

/* Modern glassmorphism effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #D9A441 0%, #f4d03f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom focus states */
*:focus {
    outline: 2px solid #D9A441;
    outline-offset: 2px;
}

/* Smooth transitions */
a, button {
    transition: all 0.3s ease;
}

/* Hero section background image placeholder */
.hero-bg {
    background-image: linear-gradient(rgba(10, 33, 64, 0.7), rgba(10, 33, 64, 0.7)),
                      url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%230A2140" width="1200" height="600"/></svg>');
    background-size: cover;
    background-position: center;
}

/* Loading animation */
.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

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

.hover-lift: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);
}

/* Language selector active state */
.language-btn.active {
    background-color: #D9A441;
    color: #0A2140;
    font-weight: 700;
}

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    nav, footer {
        display: none !important;
    }
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #0A2140;
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D9A441;
}

/* Mobile menu animation */
#mobile-menu {
    transition: all 0.3s ease-in-out;
}

/* FAQ Accordion smooth transition */
.faq-answer {
    transition: max-height 0.3s ease-out;
    overflow: hidden;
}

/* Newsletter input focus */
input[type="email"]:focus,
input[type="text"]:focus,
textarea:focus {
    outline: 2px solid #D9A441;
    outline-offset: 2px;
}

/* Blog filter buttons */
.filter-btn.active,
.category-btn.active {
    background-color: #0A2140;
    color: white;
}

/* Gradient overlays */
.gradient-overlay {
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Sticky navigation shadow */
nav.sticky {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Animation classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Button ripple effect */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Modern button styles */
button, a.btn, .btn {
    position: relative;
    overflow: hidden;
}

button::before, a.btn::before, .btn::before {
    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.5s, height 0.5s;
}

button:hover::before, a.btn:hover::before, .btn:hover::before {
    width: 300%;
    height: 300%;
}

/* Subtle animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float-animation {
    animation: float 3s ease-in-out infinite;
}

/* Glow effect */
.glow-on-hover {
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(217, 164, 65, 0.6),
                0 0 40px rgba(217, 164, 65, 0.4),
                0 0 60px rgba(217, 164, 65, 0.2);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .text-responsive {
        font-size: 0.875rem;
    }
}

/* Table responsive */
@media (max-width: 640px) {
    table {
        font-size: 0.875rem;
    }
    
    th, td {
        padding: 0.5rem !important;
    }
}

/* Loading spinner */
.spinner {
    border: 3px solid #E9ECEF;
    border-top: 3px solid #D9A441;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #0A2140;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Modal backdrop */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 999;
    backdrop-filter: blur(4px);
}

/* Badge styles */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-gold {
    background: #D9A441;
    color: #0A2140;
}

.badge-red {
    background: #CC3333;
    color: white;
}

/* Image aspect ratio utilities */
.aspect-video {
    aspect-ratio: 16 / 9;
}

.aspect-square {
    aspect-ratio: 1 / 1;
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(to right, transparent, #D9A441, transparent);
}

/* Sticky Tickets Button */
.sticky-tickets-btn {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sticky-tickets-btn:hover {
    transform: translateY(-4px);
}

.sticky-tickets-btn:active {
    transform: translateY(-2px);
}

/* Pulse animation for tickets button */
@keyframes ticket-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(204, 51, 51, 0.5);
    }
    50% {
        box-shadow: 0 4px 30px rgba(204, 51, 51, 0.8),
                    0 0 0 10px rgba(204, 51, 51, 0);
    }
}

.pulse-tickets {
    animation: ticket-pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Shine effect on tickets button */
@keyframes shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.shine-effect {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

/* Mobile adjustments for sticky button */
@media (max-width: 768px) {
    .sticky-tickets-btn {
        bottom: 1rem;
        right: 1rem;
    }
}
