/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand-blue: #00a1fe;
    --brand-green: #005a00;
    --brand-red: #ed220d;
    --brand-purple: #0000fe;
    --brand-black: #000000;
    --brand-yellow: #fdad00;
    --white: #ffffff;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d5d5d5;
    --gray-400: #a5a5a5;
    --gray-500: #757575;
    --gray-600: #555555;
    --gray-700: #353535;
    --gray-800: #252525;
    --gray-900: #151515;
}

body {
    font-family: 'Bai Jamjuree', sans-serif;
    line-height: 1.6;
    color: var(--brand-black);
    background-color: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 400;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-img {
    height: 60px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img {
    will-change: transform;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-img:hover {
    transform: scale(1.1) rotate(-2deg);
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--black);
    font-weight: 300;
    font-size: 0.875rem;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    will-change: transform, color, background;
    z-index: 1;
}

/* Background expand effect */
.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-red), var(--brand-yellow));
    background-size: 200% 200%;
    transform: translate(-50%, -50%);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    opacity: 0;
}

.nav-link:hover::before {
    width: 300px;
    height: 300px;
    opacity: 0.1;
    animation: gradientShift 3s ease infinite;
}

/* Animated underline */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--brand-blue), var(--brand-red), var(--brand-yellow));
    background-size: 200% 100%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: gradientShift 2s ease infinite;
}

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

/* Text effects */
.nav-link:hover {
    color: var(--brand-red);
    transform: translateY(-2px) scale(1.05);
    text-shadow: 0 2px 10px rgba(237, 34, 13, 0.3);
}

/* Glow effect on hover */
.nav-link:hover {
    filter: drop-shadow(0 0 8px rgba(237, 34, 13, 0.4));
}

.language-btn {
    background: var(--brand-black);
    color: var(--white);
    border: 1px solid var(--brand-black);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 1rem;
    position: relative;
    overflow: hidden;
    will-change: transform, background, color;
    z-index: 1;
}

.language-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-blue), var(--brand-red));
    transform: translate(-50%, -50%);
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1), height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.language-btn:hover::before {
    width: 200px;
    height: 200px;
}

.language-btn:hover {
    background: var(--white);
    color: var(--brand-black);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--white);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--black);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    background: var(--black);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    will-change: opacity, transform;
    transform: scale(1.05);
}

.carousel-slide.active {
    opacity: 0.3;
    transform: scale(1);
}

.carousel-slide.loaded {
    background-image: inherit;
}

/* Ajustes específicos para fotos del carrusel */

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 161, 254, 0.1) 0%, transparent 70%);
}

.hero-content {
    text-align: center;
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding-top: 60px;
}

.hero-logo {
    margin-bottom: 3rem;
    animation: fadeInUp 1s ease-out 0.1s both;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-logo-img {
    height: 320px;
    width: auto;
    filter: drop-shadow(0 4px 20px rgba(255, 215, 0, 0.3));
    transition: transform 0.3s ease;
}

.hero-logo-img {
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-logo-img:hover {
    transform: scale(1.08) rotate(2deg);
    filter: drop-shadow(0 6px 25px rgba(255, 215, 0, 0.5));
}

.hero-title {
    font-size: 5rem;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 2rem;
    letter-spacing: 0.2em;
    animation: fadeInUp 1s ease-out;
    text-transform: uppercase;
}

.hero-tagline {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 3rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.3s both;
    font-weight: 400;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    animation: fadeInUp 1s ease-out 0.6s both;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    will-change: transform, box-shadow;
}

.btn-primary {
    background: var(--brand-red);
    color: var(--white);
    border-color: var(--brand-red);
}

.btn-primary:hover {
    background: transparent;
    color: var(--brand-red);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(237, 34, 13, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--black);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 255, 255, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--black);
    border-color: var(--gray-300);
}

.btn-outline:hover:not(:disabled) {
    background: var(--black);
    color: var(--white);
    border-color: var(--black);
}

.btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--brand-blue);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, var(--brand-blue), #0080cc, #0066aa, var(--brand-blue), #00a1fe);
    background-size: 400% 400%;
    animation: gradientShift 8s ease infinite;
    opacity: 0.8;
    z-index: 1;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.about-text {
    padding-right: 2rem;
}

.about-description {
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2rem;
    font-weight: 400;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    height: 500px;
    align-items: center;
    justify-items: center;
}

.about-image {
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    background: transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-image:first-child {
    grid-row: 1 / 3;
}

.about-image:nth-child(2) {
    grid-row: 1 / 2;
}

.about-image:nth-child(3) {
    grid-row: 2 / 3;
}

.about-image:nth-child(4) {
    grid-row: 1 / 2;
}

.about-image:nth-child(5) {
    grid-row: 2 / 3;
}

.about-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.about-image {
    will-change: transform;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.about-image:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.about-img {
    will-change: transform, filter;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.4s ease;
}

.about-img:hover {
    transform: scale(1.12) rotate(2deg);
    filter: brightness(1.15) contrast(1.15) saturate(1.1);
}

/* Ajustes específicos para fotos que se cortan en la sección About */
.about-img[alt*="flow"] {
    object-fit: cover;
    object-position: center;
}

.about-img[alt*="river"] {
    object-fit: contain;
    object-position: center;
}

.about-img[alt*="busch"] {
    object-fit: contain;
    object-position: center;
}

.about-img[alt*="cherry"] {
    object-fit: contain;
    object-position: center;
}

.about-img[alt*="muria"] {
    object-fit: contain;
    object-position: center;
}

/* Timeline Section */
.timeline {
    padding: 6rem 0;
    background: var(--brand-green);
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, var(--brand-green), #007700, #004400, var(--brand-green), #00aa00);
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
    opacity: 0.8;
    z-index: 1;
}

.timeline-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.timeline-item {
    will-change: transform, background;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.timeline-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(15px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.timeline-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
    margin-right: 2rem;
    text-align: center;
}

.timeline-day {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.timeline-month {
    font-size: 0.875rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.5rem;
}

.timeline-year {
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 0.25rem;
}

.timeline-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--white);
    font-weight: 600;
}

.timeline-location {
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: 300;
}

.timeline-content p {
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    font-size: 0.875rem;
    font-weight: 300;
}

.timeline-view-photos {
    background: var(--white);
    color: var(--brand-green);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-family: 'Bai Jamjuree', sans-serif;
    will-change: transform, background;
}

.timeline-view-photos:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.95);
}

/* Timeline text colors to white for better contrast */
.timeline .section-title {
    color: var(--white);
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.5);
    font-weight: 500;
}

/* Tour Section */
.tour {
    padding: 6rem 0;
    background: var(--brand-red);
    position: relative;
}

.tour::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, var(--brand-red), #cc1a0a, #aa1508, var(--brand-red), #ff3333);
    background-size: 400% 400%;
    animation: gradientShift 6s ease infinite;
    opacity: 0.8;
    z-index: 1;
}

.tour-dates {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.tour-item {
    display: flex;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, background;
}

.tour-item:hover {
    background-color: transparent;
    transform: translateX(15px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tour-item:last-child {
    border-bottom: none;
}

.tour-date {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 100px;
    margin-right: 2rem;
}

.tour-date .month {
    font-size: 0.75rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 0.25rem;
}

.tour-date .day {
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--white);
    line-height: 1;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.tour-info {
    flex: 1;
}

.tour-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
    color: var(--white);
    font-weight: 500;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
}

.tour-info p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.875rem;
    font-weight: 400;
}

.tour-status {
    margin-left: 2rem;
}

.status-soon {
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    padding: 0.25rem 0;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

/* Merch Section */
.merch {
    padding: 6rem 0;
    background: var(--brand-purple);
    position: relative;
}

.merch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, var(--brand-purple), #0000cc, #0000aa, var(--brand-purple), #3333ff);
    background-size: 400% 400%;
    animation: gradientShift 7s ease infinite;
    opacity: 0.8;
    z-index: 1;
}

.merch-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.merch-placeholder h3 {
    font-size: 2rem;
    font-weight: 300;
    color: var(--black);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.merch-placeholder p {
    font-size: 1rem;
    color: var(--gray-500);
    margin-bottom: 3rem;
    font-weight: 300;
}

.merch-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Contact Section */
.contact {
    padding: 6rem 0;
    background: var(--brand-yellow);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, var(--brand-yellow), #ffcc00, #e6b800, var(--brand-yellow), #ffff00);
    background-size: 400% 400%;
    animation: gradientShift 9s ease infinite;
    opacity: 0.8;
    z-index: 1;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    position: relative;
    z-index: 2;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item h3 {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: rgba(0, 0, 0, 0.8);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-item p {
    color: var(--black);
    margin: 0;
    font-weight: 500;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--black);
    padding: 0.75rem 0;
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 300;
    font-size: 0.875rem;
    will-change: transform;
}

.social-link:hover {
    background: transparent;
    transform: translateX(8px) scale(1.02);
    border-bottom-color: var(--primary-red);
}

.social-link svg {
    width: 24px;
    height: 24px;
    transition: color 0.3s ease;
}

.social-link:hover svg {
    color: var(--primary-red);
}

/* Footer */
.footer {
    padding: 2rem 0;
    background: var(--black);
    color: var(--white);
    text-align: center;
}

.footer p {
    margin: 0;
    color: var(--gray-400);
}

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

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

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

.scale-in {
    animation: scaleIn 0.8s ease-out;
}

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

.pulse {
    animation: pulse 2s ease-in-out infinite;
    will-change: transform, opacity;
}

/* Enhanced animations for band vibe */
@keyframes subtleGlow {
    0%, 100% {
        filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
    }
}

.hero-logo-img {
    animation: subtleGlow 3s ease-in-out infinite;
}

/* Custom Cursor */
.custom-cursor {
    position: fixed;
    width: 20px;
    height: 20px;
    background: var(--brand-red);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s ease;
    mix-blend-mode: difference;
}

.custom-cursor.cursor-hover {
    transform: scale(2);
    background: var(--brand-yellow);
}

/* Particles */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: float 20s linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) rotate(360deg);
        opacity: 0;
    }
}

.particle {
    animation: particleFloat 20s linear infinite;
}

/* Hide default cursor on interactive elements */
a, button, .about-image {
    cursor: none;
}

/* Loading Animation */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--brand-black);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    animation: pulse 1s ease-in-out infinite;
}

/* Lazy Loading Styles */
.lazy {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lazy.loaded {
    opacity: 1;
}

/* Placeholder for lazy images */
.about-img {
    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;
    }
}

/* Safe Areas for iPhone (notch, rounded corners) */
@supports (padding: max(0px)) {
    body {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .navbar {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
    
    .hero-content {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
    
    .back-to-top {
        bottom: max(2rem, env(safe-area-inset-bottom) + 1rem);
        right: max(2rem, env(safe-area-inset-right) + 1rem);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Enhanced Navigation Mobile */
    .hamburger {
        display: flex;
        width: 56px;
        height: 56px;
        padding: 12px;
        position: relative;
        z-index: 1001;
        border-radius: 8px;
        transition: background 0.3s ease;
    }
    
    .hamburger:active {
        background: rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
        width: 85%;
        max-width: 320px;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
        text-align: left;
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
        box-shadow: 5px 0 30px rgba(0, 0, 0, 0.15);
        padding: max(5rem, env(safe-area-inset-top) + 3rem) 0 max(2rem, env(safe-area-inset-bottom) + 1rem) 0;
        z-index: 1000;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu.active {
        left: 0;
    }

    .nav-menu::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 70px;
        background: var(--white);
        border-bottom: 1px solid #e9ecef;
    }

    .nav-menu li {
        margin: 0;
        border-bottom: 1px solid #f1f3f4;
    }

    .nav-menu a {
        font-size: 1.25rem;
        padding: 1.5rem 2rem;
        display: flex;
        align-items: center;
        min-height: 56px; /* Minimum touch target */
        color: var(--brand-black);
        font-weight: 500;
        transition: all 0.3s ease;
        position: relative;
        -webkit-tap-highlight-color: rgba(0, 161, 254, 0.2);
    }
    
    .nav-menu a:active {
        background: linear-gradient(90deg, var(--brand-blue) 0%, transparent 100%);
        color: var(--white);
        padding-left: 3rem;
    }


    .nav-menu a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--brand-blue);
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .nav-menu a:hover::before {
        transform: scaleY(1);
    }

    .language-btn {
        margin: 2rem 2rem 0 2rem;
        padding: 1rem 2rem;
        font-size: 1.1rem;
        min-height: 56px; /* Minimum touch target */
        border-radius: 28px;
        background: var(--brand-blue);
        color: var(--white);
        border: none;
        font-weight: 600;
        -webkit-tap-highlight-color: rgba(0, 161, 254, 0.3);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .language-btn:active {
        transform: scale(0.98);
        box-shadow: 0 2px 8px rgba(0, 161, 254, 0.4);
    }
    
    .hero-content {
        padding: max(60px, env(safe-area-inset-top) + 40px) 1rem max(2rem, env(safe-area-inset-bottom) + 1rem);
        min-height: 100vh;
        min-height: 100dvh; /* Dynamic viewport height */
    }
    
    .hero-logo-img {
        height: 160px;
        max-width: 90vw;
    }
    
    .logo-img {
        height: 44px; /* Better visibility */
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
        line-height: 1.2;
        letter-spacing: 0.15em;
    }
    
    .hero-tagline {
        font-size: 1.05rem;
        margin-bottom: 2.5rem;
        padding: 0 1.5rem;
        line-height: 1.7;
        font-weight: 400;
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1.25rem;
        width: 100%;
        padding: 0 1.5rem;
    }

    .btn {
        padding: 1.25rem 2.5rem;
        font-size: 1.1rem;
        min-height: 56px; /* Minimum touch target */
        width: 100%;
        max-width: 320px;
        font-weight: 600;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .btn:active {
        transform: scale(0.98);
    }

    /* About Mobile */
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding: 0 1rem;
        overflow: hidden;
        position: relative;
    }

    .about-text {
        padding-right: 0;
        text-align: center;
        margin-bottom: 2rem;
    }

    .about-description {
        font-size: 1rem;
        line-height: 1.8;
        margin-bottom: 2rem;
    }

    .image-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        height: auto;
        padding: 0 1rem;
        margin-top: 2rem;
        overflow: hidden;
        position: relative;
    }

    .about-image {
        height: 200px;
        margin-bottom: 1rem;
    }

    .about-image:nth-child(5) {
        grid-row: 3;
        grid-column: 1 / -1;
        height: 150px;
        display: block;
    }

    /* Timeline Mobile */
    .timeline-item {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.12);
        backdrop-filter: blur(10px);
        -webkit-tap-highlight-color: rgba(255, 255, 255, 0.2);
    }
    
    .timeline-item:active {
        transform: scale(0.98);
        background: rgba(255, 255, 255, 0.18);
    }

    .timeline-date {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }

    .timeline-day {
        font-size: 2.5rem;
        font-weight: 700;
    }

    .timeline-month {
        font-size: 0.875rem;
        margin-top: 0.5rem;
    }

    .timeline-year {
        font-size: 1rem;
        margin-top: 0.5rem;
    }

    .timeline-content h3 {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }

    .timeline-location {
        font-size: 1.05rem;
        margin-bottom: 1.25rem;
        line-height: 1.5;
    }
    
    .timeline-view-photos {
        min-height: 56px;
        padding: 1rem 2rem;
        font-size: 1rem;
        margin-top: 1rem;
    }

    /* Tour Mobile */
    .tour-item {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
        padding: 2rem 1.5rem;
        margin-bottom: 1.5rem;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.1);
        backdrop-filter: blur(10px);
    }
    
    .tour-date {
        margin-bottom: 1rem;
    }
    
    .tour-date .day {
        font-size: 2.5rem;
        font-weight: 700;
    }
    
    .tour-date .month {
        font-size: 0.875rem;
        margin-top: 0.5rem;
    }
    
    .tour-info h3 {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
        line-height: 1.3;
    }
    
    .tour-info p {
        font-size: 1.05rem;
        line-height: 1.5;
    }
    
    .status-soon {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Contact Mobile */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .social-links {
        justify-content: center;
    }

    .social-link {
        width: 56px;
        height: 56px;
        padding: 14px;
        -webkit-tap-highlight-color: rgba(0, 161, 254, 0.2);
        transition: transform 0.2s ease;
    }
    
    .social-link:active {
        transform: scale(0.9);
    }
    
    .section-title {
        font-size: 2rem;
        margin-bottom: 3rem;
        padding: 0 1rem;
        line-height: 1.3;
        letter-spacing: 0.15em;
    }

    /* Compact sections with safe areas */
    .about, .timeline, .tour, .merch, .contact {
        padding: max(5rem, env(safe-area-inset-top) + 3rem) max(1rem, env(safe-area-inset-left)) max(5rem, env(safe-area-inset-bottom) + 3rem) max(1rem, env(safe-area-inset-right));
    }
    
    .container {
        padding-left: max(20px, env(safe-area-inset-left) + 10px);
        padding-right: max(20px, env(safe-area-inset-right) + 10px);
    }

    /* Reduce animations on mobile for performance */
    .about::before, .timeline::before, .tour::before, .merch::before, .contact::before {
        animation-duration: 15s;
    }

    /* Hide particles on mobile for performance */
    .particles {
        display: none;
    }

    /* Reduce parallax on mobile */
    .carousel-slide {
        transform: none !important;
    }

    /* Enhanced carousel indicators for mobile */
    .carousel-indicators {
        bottom: max(2rem, env(safe-area-inset-bottom) + 1rem);
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 1.25rem;
        padding: 0.75rem;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
        border-radius: 30px;
        margin: 0 auto;
        max-width: fit-content;
    }

    .carousel-indicator {
        width: 12px;
        height: 12px;
        min-width: 44px; /* Touch target */
        min-height: 44px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.5);
        border: 2px solid rgba(255, 255, 255, 0.8);
        cursor: pointer;
        transition: all 0.3s ease;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }
    
    .carousel-indicator::after {
        content: '';
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: inherit;
        position: absolute;
    }

    .carousel-indicator.active {
        background: var(--white);
    }
    
    .carousel-indicator.active::after {
        background: var(--white);
        transform: scale(1.2);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    }
    
    .carousel-indicator:active {
        transform: scale(0.9);
    }

    /* Progress bar for carousel */
    .carousel-progress {
        position: absolute;
        bottom: 0;
        left: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--brand-blue), var(--brand-red));
        transition: width 0.3s ease;
        border-radius: 2px;
    }

    /* Custom cursor hidden on mobile */
    .custom-cursor {
        display: none;
    }

    /* Restore default cursor on mobile */
    a, button, .about-image {
        cursor: pointer;
    }

    /* Floating back to top button */
    .back-to-top {
        position: fixed;
        bottom: max(2rem, env(safe-area-inset-bottom) + 1rem);
        right: max(2rem, env(safe-area-inset-right) + 1rem);
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        background: var(--brand-blue);
        color: var(--white);
        border: none;
        border-radius: 50%;
        font-size: 1.5rem;
        cursor: pointer;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 161, 254, 0.4);
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
    }

    .back-to-top.visible {
        opacity: 1;
        visibility: visible;
    }

    .back-to-top:active {
        transform: scale(0.9);
        box-shadow: 0 2px 15px rgba(0, 161, 254, 0.5);
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-text {
        padding-right: 0;
    }
    
    .image-grid {
        height: 400px;
    }
    
    .timeline-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .timeline-year {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .tour-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .tour-date {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .tour-status {
        margin-left: 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .merch-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 max(15px, env(safe-area-inset-left) + 10px);
    }
    
    .hero-title {
        font-size: 1.75rem;
        letter-spacing: 0.1em;
    }
    
    .hero-tagline {
        font-size: 0.95rem;
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 1.75rem;
        letter-spacing: 0.1em;
    }
    
    .timeline-item,
    .tour-item {
        padding: 1.75rem 1.25rem;
    }
    
    .timeline-content h3 {
        font-size: 1.25rem;
    }
    
    .tour-info h3 {
        font-size: 1.25rem;
    }
    
    .image-grid {
        height: auto;
        min-height: 250px;
        gap: 0.75rem;
        padding: 0 0.75rem;
    }
    
    .about-image {
        height: 180px;
    }
    
    .about-image:nth-child(5) {
        height: 140px;
    }
    
    .btn {
        font-size: 1rem;
        padding: 1.15rem 2rem;
        max-width: 100%;
    }
    
    .nav-menu a {
        font-size: 1.15rem;
        padding: 1.25rem 1.75rem;
    }
}

/* Photo Modal Styles */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Loading indicator for photos */
.photo-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--brand-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.photo-modal.active {
    display: flex;
    opacity: 1;
}

.photo-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.photo-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 3rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    z-index: 10001;
    line-height: 1;
}

.photo-modal-close:hover {
    transform: rotate(90deg);
}

.photo-carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.photo-carousel {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.photo-carousel img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    display: none;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
}

.photo-carousel img.active {
    display: block;
    opacity: 1;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from { 
        opacity: 0;
        transform: scale(0.95);
    }
    to { 
        opacity: 1;
        transform: scale(1);
    }
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
    backdrop-filter: blur(10px);
    font-family: 'Bai Jamjuree', sans-serif;
    line-height: 1;
}

.carousel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 2rem;
}

.carousel-next {
    right: 2rem;
}

.photo-counter {
    position: absolute;
    bottom: 2rem;
    color: var(--white);
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-family: 'Bai Jamjuree', sans-serif;
}

/* Mobile optimizations for modal */
@media (max-width: 768px) {
    .photo-modal {
        padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    }
    
    .photo-modal-content {
        width: 100%;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height */
        padding: max(1rem, env(safe-area-inset-top) + 0.5rem) max(1rem, env(safe-area-inset-left)) max(1rem, env(safe-area-inset-bottom) + 0.5rem) max(1rem, env(safe-area-inset-right));
    }
    
    .carousel-btn {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        font-size: 1.5rem;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px);
        border-radius: 50%;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.2s ease;
    }
    
    .carousel-btn:active {
        transform: scale(0.9);
    }
    
    .carousel-prev {
        left: max(1rem, env(safe-area-inset-left) + 0.5rem);
    }
    
    .carousel-next {
        right: max(1rem, env(safe-area-inset-right) + 0.5rem);
    }
    
    .photo-modal-close {
        top: max(1rem, env(safe-area-inset-top) + 0.5rem);
        right: max(1rem, env(safe-area-inset-right) + 0.5rem);
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        font-size: 2rem;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(10px);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: transparent;
        transition: transform 0.2s ease, background 0.2s ease;
    }
    
    .photo-modal-close:active {
        transform: scale(0.9);
        background: rgba(0, 0, 0, 0.7);
    }
    
    .photo-carousel img {
        max-height: calc(100vh - 120px);
        max-height: calc(100dvh - 120px);
    }
    
    .photo-counter {
        bottom: max(1rem, env(safe-area-inset-bottom) + 0.5rem);
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(10px);
        border-radius: 20px;
    }
}
