/* TwatAir CSS Framework - Brutally Satirical Ryanair Parody */

/* CSS Variables for Brand Colors */
:root {
    --ryanair-yellow: #FFCC00;
    --ryanair-blue: #003087;
    --ryanair-dark-blue: #001B4A;
    --warning-red: #FF0000;
    --success-green: #00AA00;
    --text-dark: #333;
    --text-light: #FFF;
    --surface: #FFFFFF;
    --surface-muted: #F4F6FB;
    --surface-accent: #FFF6CC;
    --border-subtle: rgba(0, 48, 135, 0.18);
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-strong: rgba(0, 0, 0, 0.18);
    --border-radius: 4px;
    --radius-md: 10px;
    --transition: all 0.3s ease;

    /* Layout reservations to prevent CLS */
    --header-height: 110px;
    --footer-min-height: 280px;

    /* Touch target minimum (WCAG 2.5.5) */
    --touch-target-min: 44px;

    /* Safe area insets for notched devices */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

/* ==========================================================================
   ANTI-FLASH / SMOOTH PAGE TRANSITIONS
   Prevents layout shift and flash during page load
   ========================================================================== */

/* Hide body until JS initializes - prevents flash */
body:not(.app-ready) {
    opacity: 0;
    animation: safetyFadeIn 0.3s ease-out 0.1s forwards;
}

/* Smooth fade-in when app is ready */
body.app-ready {
    opacity: 1;
    transition: opacity 0.15s ease-out;
    animation: none;
}

/* Safety fallback: ensure content shows even if JS is slow/fails */
@keyframes safetyFadeIn {
    to {
        opacity: 1;
    }
}

/* Reserve space for header to prevent layout shift */
#header-container {
    min-height: var(--header-height);
    background-color: var(--surface);
}

/* Reserve space for footer to prevent layout shift */
#footer-container {
    min-height: var(--footer-min-height);
    background-color: var(--ryanair-blue);
    /* Contain layout to prevent reflows affecting other elements */
    contain: layout style;
}

/* Fallback font-face to reduce font swap flash */
@font-face {
    font-family: 'Montserrat-Fallback';
    src: local('Arial');
    ascent-override: 91%;
    descent-override: 26%;
    line-gap-override: 0%;
    size-adjust: 108%;
}

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

html {
    font-size: 16px;
    line-height: 1.5;
    /* Smooth scrolling for anchor links */
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', 'Montserrat-Fallback', Arial, sans-serif;
    font-weight: 400;
    color: var(--text-dark);
    background-color: var(--surface-muted);
    background-image: linear-gradient(180deg, #FFFFFF 0%, #F4F6FB 100%);
    overflow-x: hidden;
}

main {
    padding: 40px 0 60px;
}

/* Typography Hierarchy */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    color: var(--ryanair-blue);
}

h1 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    margin-bottom: 0.8rem;
}

h3 {
    font-size: clamp(1.2rem, 3vw, 2rem);
    margin-bottom: 0.6rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.65;
}

strong,
b {
    font-weight: 700;
    text-transform: uppercase;
}

/* Links */
a {
    color: var(--ryanair-blue);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--ryanair-yellow);
    text-decoration: underline;
}

/* Buttons - Urgent CTA Style */
.btn {
    display: inline-block;
    padding: 14px 24px;
    min-height: var(--touch-target-min);
    background-color: var(--ryanair-yellow);
    color: var(--ryanair-blue);
    font-weight: 900;
    font-size: 1rem;
    text-transform: uppercase;
    text-decoration: none;
    border: 3px solid var(--ryanair-blue);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 1px;
    /* Better touch behavior */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

button.btn {
    font-family: inherit;
}

.btn:hover {
    background-color: var(--ryanair-blue);
    color: var(--ryanair-yellow);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px var(--shadow);
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn:focus-visible,
.nav-toggle:focus-visible,
.nav-menu li a:focus-visible,
a:focus-visible {
    outline: 3px solid var(--ryanair-yellow);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--ryanair-yellow);
    border-color: var(--ryanair-blue);
    color: var(--ryanair-blue);
}

.btn-danger {
    background-color: var(--warning-red);
    border-color: var(--warning-red);
    color: var(--text-light);
}

.btn-danger:hover {
    background-color: #CC0000;
    border-color: #CC0000;
}

.btn-success {
    background-color: var(--success-green);
    border-color: var(--success-green);
    color: var(--text-light);
}

.btn-success:hover {
    background-color: #008800;
    border-color: #008800;
}

/* Icon inside buttons */
.btn svg {
    vertical-align: middle;
    margin-right: 6px;
    flex-shrink: 0;
}

.btn-success svg {
    stroke: currentColor;
}

/* Warnings and Alerts */
.warning {
    background-color: var(--warning-red);
    color: var(--text-light);
    padding: 16px;
    border-radius: var(--border-radius);
    font-weight: 700;
    text-transform: uppercase;
    text-align: center;
    border: 3px solid #CC0000;
    animation: flash 2s infinite;
    margin-bottom: 1rem;
}

@keyframes flash {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.85;
    }
}

.alert {
    background-color: var(--ryanair-yellow);
    color: var(--ryanair-blue);
    padding: 12px;
    border-radius: var(--border-radius);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
    border: 2px solid var(--ryanair-blue);
}

.success {
    background-color: var(--success-green);
    color: var(--text-light);
    padding: 12px;
    border-radius: var(--border-radius);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.flex {
    display: flex;
    gap: 20px;
}

.flex-column {
    flex-direction: column;
}

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

.space-between {
    justify-content: space-between;
}

.space-around {
    justify-content: space-around;
}

/* Cards */
.card {
    background-color: var(--text-light);
    border: 3px solid var(--ryanair-blue);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 4px 8px var(--shadow);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px var(--shadow);
}

.card-header {
    background-color: var(--ryanair-yellow);
    color: var(--ryanair-blue);
    padding: 12px;
    font-weight: 900;
    text-transform: uppercase;
    margin: -20px -20px 20px -20px;
    border-bottom: 3px solid var(--ryanair-blue);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 8px;
    color: var(--ryanair-blue);
}

input,
select,
textarea {
    width: 100%;
    padding: 14px 12px;
    min-height: var(--touch-target-min);
    border: 2px solid var(--ryanair-blue);
    border-radius: var(--border-radius);
    font-size: 16px;
    /* Prevents iOS zoom on focus */
    background-color: var(--text-light);
    transition: var(--transition);
    -webkit-appearance: none;
    appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--ryanair-yellow);
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.3);
}

input.error,
select.error,
textarea.error {
    border-color: var(--warning-red);
    box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.3);
}

input[type="checkbox"],
input[type="radio"] {
    width: 20px;
    height: 20px;
    min-height: 20px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: var(--ryanair-blue);
}

/* Touch-friendly checkbox/radio labels */
label:has(input[type="checkbox"]),
label:has(input[type="radio"]) {
    display: flex;
    align-items: center;
    min-height: var(--touch-target-min);
    padding: 8px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

/* Header and Hero */
.header {
    background-color: var(--surface);
    border-bottom: 3px solid var(--ryanair-blue);
    box-shadow: 0 10px 20px var(--shadow);
    position: relative;
    z-index: 1000;
}

.top-bar {
    background-color: var(--ryanair-yellow);
    color: var(--ryanair-blue);
    text-align: center;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 12px;
    min-height: 32px;
}

.slogan {
    font-size: 0.9rem;
    transition: opacity 0.5s ease-in-out;
    min-height: 1.2em;
    will-change: opacity;
    display: inline-block;
}

.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px 0;
}

/* Icon utility class */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon svg {
    display: block;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 900;
    font-size: 1.4rem;
    letter-spacing: 2px;
    flex-shrink: 0;
    margin-left: 4px;
}

.logo:hover {
    text-decoration: none;
}

.logo-text {
    color: var(--ryanair-blue);
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    color: var(--ryanair-blue);
}

.logo-icon svg {
    width: 22px;
    height: 22px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    flex: 1;
    justify-content: flex-end;
}

.hero {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFF6CC 100%);
    border-bottom: 3px solid var(--ryanair-blue);
    padding: 40px 0;
}

.hero-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.hero-headline {
    transition: opacity 0.5s ease-in-out;
    will-change: opacity;
    min-height: 2.5em;
}

.hero-subheadline {
    font-size: 1.1rem;
    max-width: 54ch;
    transition: opacity 0.5s ease-in-out;
    will-change: opacity;
    min-height: 1.5em;
}

.hero-ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-warning {
    animation: none;
    background-color: var(--ryanair-dark-blue);
    color: var(--ryanair-yellow);
    border-color: var(--ryanair-yellow);
    text-transform: none;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-warning svg {
    flex-shrink: 0;
}

.memecoin-disclaimer {
    background-color: #FFF8E6;
    border: 2px dashed var(--ryanair-yellow);
    border-radius: var(--border-radius);
    padding: 14px 16px;
    margin-top: 12px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--ryanair-dark-blue);
    text-align: center;
}

.memecoin-disclaimer strong {
    display: block;
    margin-bottom: 6px;
    font-size: 0.95rem;
    color: var(--ryanair-blue);
}

.hero-visual {
    display: flex;
    justify-content: center;
}

.booking-preview {
    width: 100%;
    max-width: 420px;
}

.flight-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background-color: var(--surface-muted);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 14px;
}

.flight-info .route {
    font-weight: 900;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.flight-info .date {
    font-weight: 700;
    color: var(--ryanair-dark-blue);
}

.flight-info .price {
    font-weight: 900;
    color: var(--warning-red);
    font-size: 1.2rem;
}

.fees-preview {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 2px dashed var(--border-subtle);
}

.fees-preview .fee-item {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.fees-preview .fee-item.total {
    font-size: 1.1rem;
    color: var(--warning-red);
}

.pay-with-coin {
    margin-top: 12px;
    text-align: center;
    background-color: var(--surface-accent);
    padding: 12px;
    border-radius: var(--radius-md);
    border: 2px dashed var(--ryanair-blue);
}

/* Booking Widget */
.booking-widget {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.progress-indicator {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.progress-step {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid var(--ryanair-blue);
    color: var(--ryanair-blue);
    display: grid;
    place-items: center;
    font-weight: 900;
    background-color: var(--surface);
}

.progress-step.active {
    background-color: var(--ryanair-yellow);
}

.progress-step.completed {
    background-color: var(--success-green);
    color: var(--text-light);
    border-color: var(--success-green);
}

.booking-step {
    background-color: var(--surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.extras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.extra-item {
    background-color: var(--surface-muted);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
}

.price-summary {
    background-color: var(--surface-muted);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
    display: grid;
    gap: 10px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
}

.summary-row.total {
    font-size: 1.1rem;
    color: var(--warning-red);
}

.payment-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.payment-option {
    background-color: var(--surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
}

.booking-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

/* Fee Calculator */
.fee-calculator {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calculator-header {
    background-color: var(--surface-accent);
    border: 2px solid var(--ryanair-blue);
    border-radius: var(--radius-md);
    padding: 16px;
}

.fee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.fee-grid .fee-item {
    background-color: var(--surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.fee-grid .fee-item:has(input:checked) {
    border-color: var(--ryanair-blue);
    background-color: var(--surface-accent);
}

/* Custom checkbox styling for fee calculator */
.fee-grid .fee-item input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    min-height: 24px;
    border: 3px solid var(--ryanair-blue);
    border-radius: 4px;
    background-color: var(--surface);
    cursor: pointer;
    position: relative;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
    flex-shrink: 0;
}

.fee-grid .fee-item input[type="checkbox"]:checked {
    background-color: var(--ryanair-blue);
    border-color: var(--ryanair-blue);
}

.fee-grid .fee-item input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid var(--ryanair-yellow);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.fee-grid .fee-item input[type="checkbox"]:hover {
    border-color: var(--ryanair-yellow);
    transform: scale(1.05);
}

.fee-grid .fee-item input[type="checkbox"]:focus-visible {
    outline: 3px solid var(--ryanair-yellow);
    outline-offset: 2px;
}

.fee-grid .fee-item label {
    cursor: pointer;
    flex: 1;
}

.total-display {
    background-color: var(--ryanair-dark-blue);
    color: var(--text-light);
    border-radius: var(--radius-md);
    padding: 18px;
    border: 3px solid var(--ryanair-yellow);
}

.total-header {
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 1px;
}

.total-amount {
    font-size: 2rem;
    font-weight: 900;
    margin: 8px 0;
    transition: transform 0.15s ease;
}

/* Instant price update animations */
.total-amount.price-increase {
    animation: priceIncrease 0.3s ease-out;
}

.total-amount.price-decrease {
    animation: priceDecrease 0.3s ease-out;
}

@keyframes priceIncrease {
    0% {
        transform: scale(1);
        color: inherit;
    }
    50% {
        transform: scale(1.15);
        color: #FF0000;
    }
    100% {
        transform: scale(1);
        color: inherit;
    }
}

@keyframes priceDecrease {
    0% {
        transform: scale(1);
        color: inherit;
    }
    50% {
        transform: scale(1.15);
        color: #00AA00;
    }
    100% {
        transform: scale(1);
        color: inherit;
    }
}

.calculator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.disclaimer {
    background-color: var(--surface-muted);
    border: 2px dashed var(--ryanair-blue);
    border-radius: var(--radius-md);
    padding: 16px;
}

.alert-info {
    background-color: var(--ryanair-blue);
    color: var(--text-light);
    border: 2px solid var(--ryanair-yellow);
}

/* Destinations */
.destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.destination-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.destination-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.price-label {
    font-weight: 900;
}

.price-amount {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--warning-red);
}

.destination-insults {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.insult-tag {
    background-color: var(--ryanair-blue);
    color: var(--text-light);
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Coin Page */
.coin-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.coin-hero {
    background: linear-gradient(135deg, #FFFFFF 0%, #F4F6FB 100%);
    border: 3px solid var(--ryanair-blue);
    border-radius: var(--radius-md);
    padding: 20px;
}

.coin-header {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.coin-logo {
    font-size: 2rem;
}

.coin-price-display {
    margin: 16px 0;
}

.current-price {
    display: grid;
    gap: 6px;
    background-color: var(--surface-accent);
    border: 2px solid var(--ryanair-blue);
    border-radius: var(--radius-md);
    padding: 12px;
}

.price-label {
    font-weight: 900;
    letter-spacing: 1px;
}

.price-value {
    font-size: 2rem;
    font-weight: 900;
}

.price-change {
    font-weight: 900;
}

.price-change.positive {
    color: var(--success-green);
}

.price-change.negative {
    color: var(--warning-red);
}

.coin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.token-address {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: var(--surface-muted);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.address-label {
    font-weight: 900;
    font-size: 0.8rem;
    color: var(--ryanair-dark-blue);
    text-transform: uppercase;
}

.address-value {
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.85rem;
    color: var(--ryanair-blue);
    background-color: var(--surface);
    padding: 6px 10px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-subtle);
    word-break: break-all;
    flex: 1;
    min-width: 200px;
}

.copy-btn {
    background-color: var(--ryanair-blue);
    color: var(--text-light);
    border: none;
    padding: 6px 12px;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.copy-btn:hover {
    background-color: var(--ryanair-dark-blue);
}

.copy-btn.copied {
    background-color: var(--success-green);
}

.community-link-primary {
    background-color: var(--ryanair-yellow) !important;
    border-color: var(--ryanair-blue) !important;
    font-weight: 900;
}

.community-link-primary:hover {
    background-color: var(--ryanair-blue) !important;
    color: var(--ryanair-yellow) !important;
}

.community-icon {
    font-weight: 900;
    font-size: 0.75rem;
    min-width: 32px;
    text-align: center;
}

/* API Status Indicator */
.api-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.api-status.live {
    background-color: var(--success-green);
    color: var(--text-light);
}

.api-status.demo {
    background-color: var(--ryanair-yellow);
    color: var(--ryanair-blue);
}

.coin-chart .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.chart-controls {
    display: flex;
    gap: 8px;
}

.chart-btn {
    background-color: var(--surface);
    border: 2px solid var(--ryanair-blue);
    border-radius: var(--border-radius);
    padding: 6px 10px;
    font-weight: 700;
    cursor: pointer;
}

.chart-btn.active {
    background-color: var(--ryanair-yellow);
}

.ascii-chart {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 180px;
    background-color: var(--surface-muted);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
}

.chart-bar {
    flex: 1;
    background-color: var(--ryanair-blue);
    border-radius: 6px 6px 0 0;
    position: relative;
}

.bar-value {
    position: absolute;
    top: -24px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--ryanair-dark-blue);
    color: var(--text-light);
    padding: 2px 6px;
    border-radius: 999px;
    font-size: 0.7rem;
    opacity: 0;
    transition: var(--transition);
    white-space: nowrap;
}

.chart-bar:hover .bar-value {
    opacity: 1;
}

.chart-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--ryanair-dark-blue);
    margin-top: 8px;
}

.coin-stats .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.stat-item,
.stat-card {
    background-color: var(--surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
}

.stat-label {
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--ryanair-dark-blue);
}

.stat-value {
    font-weight: 900;
    font-size: 1.4rem;
}

.coin-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.feature {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background-color: var(--surface-muted);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
}

.feature-icon {
    font-size: 1.4rem;
}

.roadmap-timeline {
    display: grid;
    gap: 12px;
}

.roadmap-item {
    border-left: 4px solid var(--ryanair-blue);
    padding-left: 12px;
}

.roadmap-item.completed {
    border-left-color: var(--success-green);
}

.roadmap-item.active {
    border-left-color: var(--ryanair-yellow);
}

.community-links {
    display: grid;
    gap: 10px;
}

.community-link {
    display: flex;
    gap: 10px;
    align-items: center;
    background-color: var(--surface);
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}

.community-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.community-stat {
    background-color: var(--surface-muted);
    border-radius: var(--radius-md);
    padding: 12px;
    text-align: center;
}

.stat-number {
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--ryanair-blue);
}

.coin-disclaimer {
    border: 2px dashed var(--warning-red);
    background-color: #FFF0F0;
}

/* About Page */
.about-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-hero {
    background: linear-gradient(135deg, #FFFFFF 0%, #F4F6FB 100%);
    border: 3px solid var(--ryanair-blue);
    border-radius: var(--radius-md);
    padding: 20px;
}

.about-tagline {
    font-size: 1.1rem;
    font-weight: 700;
}

.about-intro {
    max-width: 70ch;
}

.timeline-container {
    display: grid;
    gap: 16px;
}

.timeline-item .timeline-content {
    position: relative;
}

.timeline-year {
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--ryanair-blue);
}

.timeline-image {
    font-size: 1.6rem;
    margin: 6px 0;
}

.elon-quote {
    background-color: var(--surface-accent);
    border-left: 4px solid var(--ryanair-blue);
    padding: 10px 12px;
    margin-top: 10px;
    font-style: italic;
}

.mission-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    align-items: center;
}

.mission-image {
    font-size: 2rem;
    text-align: center;
}

.cta-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Contact Page */
.contact-form-container {
    display: grid;
    gap: 20px;
}

.form-section {
    border-top: 2px solid var(--border-subtle);
    padding-top: 16px;
    margin-top: 16px;
}

.form-section:first-of-type {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.contact-response {
    min-height: 40px;
}

.contact-methods {
    display: grid;
    gap: 12px;
}

/* Tables - Responsive wrapper for horizontal scroll on mobile */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 20px;
}

.table-responsive .table {
    margin-bottom: 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    min-width: 500px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--ryanair-blue);
    white-space: nowrap;
}

.table th {
    background-color: var(--ryanair-yellow);
    color: var(--ryanair-blue);
    font-weight: 900;
    text-transform: uppercase;
    position: sticky;
    top: 0;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-10px);
    }

    60% {
        transform: translateY(-5px);
    }
}

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

.bounce {
    animation: bounce 1s infinite;
}

/* Fee explosion animation */
.fee-explosion {
    animation: feeExplosion 0.5s ease-out;
}

@keyframes feeExplosion {
    0% {
        transform: scale(1);
        color: var(--text-dark);
    }

    50% {
        transform: scale(1.2);
        color: var(--warning-red);
    }

    100% {
        transform: scale(1);
        color: var(--warning-red);
    }
}

/* Price ticker animation */
.price-pump {
    animation: pricePump 0.8s ease-out;
}

@keyframes pricePump {
    0% {
        transform: scale(1);
        color: var(--success-green);
    }

    25% {
        transform: scale(1.1);
        color: var(--ryanair-yellow);
    }

    50% {
        transform: scale(1.2);
        color: var(--warning-red);
    }

    75% {
        transform: scale(1.1);
        color: var(--ryanair-yellow);
    }

    100% {
        transform: scale(1);
        color: var(--success-green);
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN - MOBILE OPTIMIZATIONS
   ========================================================================== */

/* Tablet breakpoint (600-768px) */
@media (max-width: 768px) {
    :root {
        /* Taller footer for stacked mobile layout */
        --footer-min-height: 460px;
    }

    .container {
        padding: 0 16px;
        padding-left: max(16px, var(--safe-area-left));
        padding-right: max(16px, var(--safe-area-right));
    }

    main {
        padding: 24px 0 40px;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .flex {
        flex-direction: column;
    }

    h1 {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }

    h2 {
        font-size: clamp(1.4rem, 5vw, 2rem);
    }

    .btn {
        width: 100%;
        text-align: center;
        padding: 16px 24px;
    }

    .card {
        margin-bottom: 16px;
    }

    /* Form row - stack on mobile */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Better spacing for booking steps */
    .booking-step {
        padding: 16px;
    }

    /* Hero adjustments */
    .hero {
        padding: 24px 0;
    }

    .hero-container {
        gap: 24px;
    }

    .hero-ctas {
        flex-direction: column;
    }

    .hero-ctas .btn {
        width: 100%;
    }

    /* Slogan adjustments */
    .slogan {
        font-size: 0.8rem;
        padding: 0 8px;
    }

    /* Footer mobile - stable single column */
    .footer {
        padding: 32px 0 16px;
        padding-bottom: max(16px, var(--safe-area-bottom));
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section ul li a {
        justify-content: center;
    }
}

/* Small tablet / large phone (481-600px) */
@media (max-width: 600px) {
    .container {
        padding: 0 12px;
        padding-left: max(12px, var(--safe-area-left));
        padding-right: max(12px, var(--safe-area-right));
    }

    /* 2-column grids can stay as 2 columns on larger phones */
    .grid-2 {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    /* Extras grid - ensure it stacks */
    .extras-grid {
        grid-template-columns: 1fr;
    }

    /* Fee grid - stack */
    .fee-grid {
        grid-template-columns: 1fr;
    }

    /* Coin features - stack */
    .coin-features {
        grid-template-columns: 1fr;
    }

    /* Stats grid - 2 columns on tablets */
    .coin-stats .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Token address - stack vertically */
    .token-address {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .address-value {
        min-width: auto;
        text-align: center;
    }

    .copy-btn {
        align-self: center;
    }
}

/* Small phones (max-width: 480px) */
@media (max-width: 480px) {
    html {
        font-size: 15px;
    }

    .container {
        padding: 0 12px;
    }

    main {
        padding: 20px 0 32px;
    }

    h1 {
        font-size: 1.6rem;
        letter-spacing: 0.5px;
    }

    h2 {
        font-size: 1.35rem;
    }

    h3 {
        font-size: 1.15rem;
    }

    .warning {
        font-size: 0.85rem;
        padding: 12px;
    }

    .card {
        padding: 14px;
        border-width: 2px;
    }

    .card-header {
        padding: 10px;
        margin: -14px -14px 14px -14px;
        font-size: 0.9rem;
    }

    /* Booking widget mobile optimizations */
    .progress-indicator {
        gap: 6px;
    }

    .progress-step {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .booking-step {
        padding: 14px;
    }

    .booking-nav {
        flex-direction: column;
    }

    .booking-nav .btn {
        width: 100%;
    }

    /* Price display adjustments */
    .price-value {
        font-size: 1.6rem;
    }

    .total-amount {
        font-size: 1.6rem;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    /* Community stats - stack */
    .community-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Coin stats - single column */
    .coin-stats .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Chart adjustments */
    .ascii-chart {
        height: 140px;
        padding: 10px;
        gap: 4px;
    }

    .chart-controls {
        flex-wrap: wrap;
    }

    .chart-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    /* Destination cards */
    .destination-insults {
        gap: 6px;
    }

    .insult-tag {
        font-size: 0.75rem;
        padding: 3px 6px;
    }

    /* Flight info compact */
    .flight-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 10px 12px;
    }

    /* Top bar */
    .top-bar {
        padding: 8px 10px;
    }

    .slogan {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    /* Logo sizing */
    .logo {
        font-size: 1.2rem;
        gap: 6px;
    }

    .logo-icon svg {
        width: 18px;
        height: 18px;
    }

    /* Header main */
    .header-main {
        padding: 10px 0;
        gap: 12px;
    }
}

/* Extra small phones (max-width: 360px) */
@media (max-width: 360px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 10px;
    }

    h1 {
        font-size: 1.4rem;
    }

    .btn {
        padding: 14px 16px;
        font-size: 0.9rem;
    }

    .card {
        padding: 12px;
    }

    .card-header {
        margin: -12px -12px 12px -12px;
    }

    /* Progress steps smaller */
    .progress-step {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
        border-width: 2px;
    }

    /* Community stats - single column */
    .community-stats {
        grid-template-columns: 1fr;
    }

    .logo {
        font-size: 1.1rem;
    }
}

/* Navigation specific styles */
.nav-toggle {
    display: none;
    background: var(--surface);
    border: 2px solid var(--ryanair-blue);
    cursor: pointer;
    color: var(--ryanair-blue);
    padding: 8px;
    border-radius: var(--border-radius);
    line-height: 0;
}

.nav-toggle svg {
    width: 24px;
    height: 24px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    flex-shrink: 0;
}

.nav-menu li a {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 10px 14px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--ryanair-blue);
    text-decoration: none;
    white-space: nowrap;
}

.nav-menu li a:hover {
    text-decoration: none;
}

.nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
}

.nav-text {
    line-height: 1;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background-color: var(--ryanair-blue);
    color: var(--text-light);
}

@media (max-width: 900px) {
    .nav-menu li a {
        padding: 8px 10px;
        font-size: 0.7rem;
    }

    .nav-icon svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        min-width: var(--touch-target-min);
        min-height: var(--touch-target-min);
        padding: 10px;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background-color: var(--text-light);
        border: 2px solid var(--ryanair-blue);
        border-top: none;
        padding: 12px;
        gap: 4px;
        z-index: 100;
        box-shadow: 0 10px 30px var(--shadow-strong);
        max-height: calc(100vh - var(--header-height) - 20px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        flex-direction: row;
        justify-content: flex-start;
        gap: 14px;
        padding: 14px 16px;
        min-height: var(--touch-target-min);
        font-size: 0.95rem;
        width: 100%;
        border-radius: var(--radius-md);
    }

    .nav-menu li a:active {
        background-color: var(--ryanair-blue);
        color: var(--text-light);
        transform: scale(0.98);
    }

    .nav-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* Footer styles */
.footer {
    background-color: var(--ryanair-blue);
    color: var(--text-light);
    padding: 40px 0 20px;
    margin-top: 40px;
    /* Prevent layout thrashing */
    contain: content;
}

.footer-content {
    display: grid;
    /* Use fixed 3-column layout for predictable sizing */
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-section {
    /* Prevent sections from collapsing or expanding unexpectedly */
    min-width: 0;
}

.footer-section h3 {
    color: var(--ryanair-yellow);
    margin-bottom: 15px;
    font-size: 1.2rem;
    /* Fixed height for headings to prevent layout shift */
    line-height: 1.3;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
    /* Consistent line height for stability */
    line-height: 1.5;
}

.footer-section ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--ryanair-yellow);
}

.footer-section ul li a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-icon {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.footer-icon svg {
    width: 16px;
    height: 16px;
}

.footer-bottom {
    border-top: 1px solid var(--ryanair-yellow);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    /* Prevent layout shift from text rendering */
    line-height: 1.6;
}

.footer-bottom p {
    margin: 0;
}

.footer-bottom small {
    display: block;
    margin-top: 8px;
}

/* Crypto ticker styles */
.crypto-ticker {
    background-color: var(--ryanair-blue);
    color: var(--text-light);
    padding: 8px 0;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    overflow: hidden;
    min-height: 36px;
    contain: layout;
}

.ticker-content {
    display: flex;
    animation: tickerScroll 20s linear infinite;
    will-change: transform;
}

@keyframes tickerScroll {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.ticker-item {
    white-space: nowrap;
    margin-right: 40px;
    color: var(--ryanair-yellow);
    min-width: 200px;
}

.ticker-item.positive {
    color: var(--success-green);
}

.ticker-item.negative {
    color: var(--warning-red);
}

/* Utility classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.flex {
    display: flex;
}

.grid {
    display: grid;
}

/* Icon sizing utilities */
.icon-sm svg {
    width: 14px;
    height: 14px;
}

.icon-md svg {
    width: 18px;
    height: 18px;
}

.icon-lg svg {
    width: 24px;
    height: 24px;
}

.icon-xl svg {
    width: 32px;
    height: 32px;
}

@media (max-width: 900px) {
    :root {
        --header-height: 100px;
    }

    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        justify-content: flex-start;
    }

    .coin-chart .chart-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* Footer tablet - 2 columns for smoother transition */
    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    /* First section spans full width on tablet */
    .footer-section:first-child {
        grid-column: 1 / -1;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --header-height: 90px;
        /* Taller min-height for stacked mobile footer */
        --footer-min-height: 420px;
    }

    .footer-bottom {
        font-size: 0.8rem;
    }

    .footer-bottom small {
        font-size: 0.75rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}

/* ==========================================================================
   TOAST NOTIFICATION SYSTEM
   ========================================================================== */

.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 300px;
    max-width: 420px;
    padding: 16px;
    border-radius: var(--radius-md);
    border: 3px solid;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    animation: toastSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.toast.toast--exiting {
    animation: toastSlideOut 0.3s ease-in forwards;
}

.toast--success {
    background-color: #E8F5E9;
    border-color: var(--success-green);
    color: #1B5E20;
}

.toast--error {
    background-color: #FFEBEE;
    border-color: var(--warning-red);
    color: #B71C1C;
}

.toast--warning {
    background-color: #FFF8E1;
    border-color: #F9A825;
    color: #E65100;
}

.toast--info {
    background-color: #E3F2FD;
    border-color: var(--ryanair-blue);
    color: var(--ryanair-dark-blue);
}

.toast__icon {
    font-size: 1.4rem;
    flex-shrink: 0;
    line-height: 1;
}

.toast__content {
    flex: 1;
    min-width: 0;
}

.toast__title {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.toast__message {
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.toast__close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.toast__close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background-color: currentColor;
    opacity: 0.3;
    border-radius: 0 0 0 var(--radius-md);
    animation: toastProgress 4s linear forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

@keyframes toastProgress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Mobile toast - slides from bottom */
@media (max-width: 480px) {
    .toast-container {
        bottom: 12px;
        left: 12px;
        right: 12px;
        bottom: max(12px, var(--safe-area-bottom));
    }

    .toast {
        min-width: auto;
        max-width: none;
        transform: translateY(120%);
        padding: 14px;
    }

    .toast__title {
        font-size: 0.8rem;
    }

    .toast__message {
        font-size: 0.85rem;
    }

    .toast__close {
        min-width: var(--touch-target-min);
        min-height: var(--touch-target-min);
        display: flex;
        align-items: center;
        justify-content: center;
        margin: -8px -8px -8px 0;
    }

    @keyframes toastSlideIn {
        from {
            transform: translateY(120%);
            opacity: 0;
        }

        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    @keyframes toastSlideOut {
        from {
            transform: translateY(0);
            opacity: 1;
        }

        to {
            transform: translateY(120%);
            opacity: 0;
        }
    }
}

/* ==========================================================================
   MOBILE MENU BACKDROP & ANIMATIONS
   ========================================================================== */

.nav-backdrop {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 48, 135, 0.7);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.nav-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.nav-toggle {
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.nav-toggle.active {
    transform: rotate(90deg);
    background-color: var(--ryanair-yellow);
}

body.menu-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .nav-menu li {
        opacity: 0;
        transform: translateX(-20px);
    }

    .nav-menu.open li {
        animation: menuItemSlideIn 0.3s ease forwards;
    }

    .nav-menu.open li:nth-child(1) {
        animation-delay: 0.05s;
    }

    .nav-menu.open li:nth-child(2) {
        animation-delay: 0.1s;
    }

    .nav-menu.open li:nth-child(3) {
        animation-delay: 0.15s;
    }

    .nav-menu.open li:nth-child(4) {
        animation-delay: 0.2s;
    }

    .nav-menu.open li:nth-child(5) {
        animation-delay: 0.25s;
    }

    .nav-menu.open li:nth-child(6) {
        animation-delay: 0.3s;
    }

    .nav-menu.open li:nth-child(7) {
        animation-delay: 0.35s;
    }
}

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

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ==========================================================================
   ENHANCED BUTTON HOVER EFFECTS
   ========================================================================== */

.btn {
    position: relative;
    overflow: hidden;
}

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

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

.btn:hover {
    box-shadow: 0 6px 20px rgba(0, 48, 135, 0.3);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(0, 170, 0, 0.4);
}

.btn-danger:hover {
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

/* ==========================================================================
   ENHANCED CARD HOVER EFFECTS
   ========================================================================== */

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px var(--shadow-strong);
    border-color: var(--ryanair-yellow);
}

.card:hover .card-header {
    background-color: var(--ryanair-blue);
    color: var(--ryanair-yellow);
}

.card-header {
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Destination card enhancements */
.destination-card:hover {
    transform: translateY(-8px) scale(1.02);
}

.destination-card:hover .price-amount {
    animation: priceBounce 0.5s ease;
}

@keyframes priceBounce {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* Stat card enhancements */
.stat-item:hover .stat-value,
.stat-card:hover .stat-value {
    transform: scale(1.1);
    color: var(--ryanair-blue);
}

.stat-value {
    transition: transform 0.3s ease, color 0.3s ease;
}

/* ==========================================================================
   NAV LINK UNDERLINE ANIMATION
   ========================================================================== */

.nav-menu li a {
    position: relative;
}

.nav-menu li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-color: var(--ryanair-yellow);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-menu li a:hover::before,
.nav-menu li a.active::before {
    width: 100%;
    left: 0;
}

@media (max-width: 768px) {
    .nav-menu li a::before {
        display: none;
    }
}

/* ==========================================================================
   BETTER FORM ERROR DISPLAY
   ========================================================================== */

.form-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    margin-top: 8px;
    background-color: #FFEBEE;
    border: 2px solid var(--warning-red);
    border-radius: var(--border-radius);
    color: #B71C1C;
    font-weight: 700;
    font-size: 0.9rem;
    animation: errorShake 0.4s ease;
}

.form-error__message {
    flex: 1;
}

.form-error__close {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 1;
    color: inherit;
}

.form-error__close:hover {
    opacity: 1;
}

@keyframes errorShake {

    0%,
    100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-8px);
    }

    40% {
        transform: translateX(8px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }
}

input.error,
select.error,
textarea.error {
    border-color: var(--warning-red);
    animation: inputErrorPulse 2s ease infinite;
}

@keyframes inputErrorPulse {

    0%,
    100% {
        box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.2);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.3);
    }
}

/* ==========================================================================
   LOADING STATES - SKELETONS & SPINNERS
   ========================================================================== */

.skeleton {
    background: linear-gradient(90deg,
            var(--surface-muted) 25%,
            #E8EBF2 50%,
            var(--surface-muted) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s ease infinite;
    border-radius: var(--border-radius);
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 1em;
}

.skeleton-card {
    height: 200px;
}

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

    100% {
        background-position: -200% 0;
    }
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-subtle);
    border-top-color: var(--ryanair-blue);
    border-radius: 50%;
    animation: spinnerRotate 0.8s linear infinite;
}

.spinner--small {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner--large {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

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

.btn--loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn--loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spinnerRotate 0.8s linear infinite;
}

.btn--loading::after {
    display: none;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}

/* Reduced motion - disable loading animations */
@media (prefers-reduced-motion: reduce) {
    .skeleton {
        animation: none;
        background: var(--surface-muted);
    }

    .spinner {
        animation: none;
        border-top-color: var(--ryanair-blue);
        opacity: 0.5;
    }

    .toast {
        animation: none;
        transform: none;
        opacity: 1;
    }

    .toast.toast--exiting {
        animation: none;
        opacity: 0;
    }

    .nav-menu.open li {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .form-error {
        animation: none;
    }

    input.error,
    select.error,
    textarea.error {
        animation: none;
    }
}

/* ==========================================================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================================================== */

/* Detect touch devices and add active states */
@media (hover: none) and (pointer: coarse) {

    /* Remove hover effects on touch devices */
    .card:hover {
        transform: none;
        box-shadow: 0 4px 8px var(--shadow);
    }

    .destination-card:hover {
        transform: none;
    }

    /* Active states for touch */
    .btn:active {
        transform: scale(0.96);
        opacity: 0.9;
    }

    .card:active {
        transform: scale(0.98);
        box-shadow: 0 2px 4px var(--shadow);
    }

    .community-link:active {
        background-color: var(--surface-muted);
        transform: scale(0.98);
    }

    .extra-item:active {
        background-color: var(--surface-accent);
        transform: scale(0.98);
    }

    /* Larger tap targets for icons */
    .copy-btn {
        padding: 10px 16px;
        min-height: var(--touch-target-min);
    }

    .chart-btn {
        min-height: var(--touch-target-min);
        padding: 10px 14px;
    }

    /* Better scrolling */
    .table-responsive,
    .nav-menu {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* ==========================================================================
   LANDSCAPE MOBILE OPTIMIZATIONS
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 16px 0;
    }

    .hero-container {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    main {
        padding: 16px 0 24px;
    }

    .nav-menu {
        max-height: 60vh;
    }

    /* Reduce vertical spacing */
    h1 {
        margin-bottom: 0.5rem;
    }

    h2 {
        margin-bottom: 0.4rem;
    }
}

/* ==========================================================================
   HIGH DPI / RETINA DISPLAY OPTIMIZATIONS
   ========================================================================== */

@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Sharper borders on retina displays */
    .card,
    .btn,
    input,
    select,
    textarea {
        border-width: 2px;
    }
}

/* ==========================================================================
   PRINT STYLES (BASIC)
   ========================================================================== */

@media print {

    .header,
    .footer,
    .nav-toggle,
    .toast-container,
    .crypto-ticker {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    a {
        color: inherit;
        text-decoration: underline;
    }

    .btn {
        border: 1px solid black;
        background: white;
        color: black;
    }
}