/* === CSS CUSTOM PROPERTIES === */
:root {
    --color-bg: #eceafe;
    --color-surface: #ffffff;
    --color-primary: #1800ad;
    --color-primary-light: #3d25d4;
    --color-primary-muted: #8f82e5;
    --color-accent: #ff3131;
    --color-text: #1a1a1a;
    --color-text-muted: #374151;
    --color-text-subtle: #6b7280;
    --color-border: #d4d0f8;
    --color-shadow: rgba(24, 0, 173, 0.10);
    --color-shadow-strong: rgba(24, 0, 173, 0.18);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --transition-fast: 0.18s ease;
    --transition-base: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.45s cubic-bezier(0.4, 0, 0.2, 1);

    --nav-height: clamp(64px, 9vw, 92px);
    --page-pad-x: clamp(20px, 5vw, 72px);
    --page-pad-y: clamp(36px, 6vw, 72px);
}

/* === RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === BASE === */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: "Nunito", sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
}

/* === SCROLL REVEAL === */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === NAVBAR === */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--page-pad-x);
    height: var(--nav-height);
    background-color: var(--color-bg);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-border);
    transition: box-shadow var(--transition-base), background var(--transition-base);
}

.navbar.scrolled {
    box-shadow: 0 2px 20px var(--color-shadow);
    background: rgba(236, 234, 254, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.logo img {
    height: clamp(46px, 7vw, 72px);
    width: auto;
    transition: opacity var(--transition-fast);
}

.logo:hover img {
    opacity: 0.82;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: clamp(18px, 2.8vw, 38px);
}

.nav-links a {
    color: var(--color-primary);
    font-weight: 700;
    font-size: clamp(14px, 1.4vw, 19px);
    white-space: nowrap;
    position: relative;
    padding-bottom: 4px;
    transition: color var(--transition-fast);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: width var(--transition-base);
}

.nav-links a:hover {
    color: var(--color-primary-muted);
}

.nav-links a:hover::after {
    width: 100%;
    background: var(--color-primary-muted);
}

.nav-links a.active::after {
    width: 100%;
}

/* === HAMBURGER === */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    gap: 4px;
}

.hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--color-primary);
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* === MOBILE SIDEBAR === */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--color-surface);
    z-index: 300;
    display: flex;
    flex-direction: column;
    padding: 28px 24px;
    gap: 0;
    box-shadow: -6px 0 32px rgba(24, 0, 173, 0.14);
    transition: right 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav .close-btn {
    align-self: flex-end;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 20px;
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.mobile-nav .close-btn:hover {
    color: var(--color-accent);
    transform: rotate(90deg);
}

.mobile-nav a {
    color: var(--color-primary);
    font-weight: 700;
    font-size: 18px;
    border-bottom: 1px solid var(--color-border);
    padding: 16px 0;
    transition: color var(--transition-fast), padding-left var(--transition-fast);
}

.mobile-nav a:hover {
    color: var(--color-primary-muted);
    padding-left: 6px;
}

.mobile-nav a.active {
    padding-left: 12px;
    border-left: 3px solid var(--color-primary);
    color: var(--color-primary);
}

.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    z-index: 200;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.mobile-overlay.visible {
    display: block;
    animation: fadeIn 0.25s ease;
}

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

/* === HERO === */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(24px, 4vw, 64px);
    padding: var(--page-pad-y) var(--page-pad-x);
    background: var(--color-surface);
    flex-wrap: wrap;
}

.hero-text {
    flex: 1 1 320px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-text h1 {
    font-size: clamp(22px, 3.2vw, 40px);
    color: var(--color-primary);
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    margin-bottom: 18px;
    letter-spacing: -0.01em;
}

.highlight-red {
    color: var(--color-accent) !important;
}

.hero-motto {
    display: block;
    font-family: "Bellota Text", cursive;
    font-size: clamp(17px, 1.9vw, 23px);
    font-style: italic;
    text-align: center;
    margin-bottom: 28px;
    color: var(--color-accent);
    line-height: 1.4;
}

.hero-description p {
    font-size: clamp(15px, 1.5vw, 18px);
    text-align: center;
    color: var(--color-primary);
    line-height: 1.85;
    margin-bottom: 14px;
}

.hero-description p:last-child {
    margin-bottom: 0;
}

.accent-text {
    font-weight: 700;
    font-size: clamp(16px, 1.7vw, 20px) !important;
}

.hero-image {
    flex: 1 1 320px;
    min-width: 0;
}

.hero-image img {
    width: 100%;
    border-radius: var(--radius-lg);
    object-fit: cover;
    box-shadow: 0 12px 40px var(--color-shadow-strong);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.hero-image img:hover {
    transform: scale(1.018);
    box-shadow: 0 18px 52px var(--color-shadow-strong);
}

/* === INFO SECTIONS === */
.info-sections {
    display: flex;
    justify-content: space-between;
    gap: clamp(16px, 2.2vw, 28px);
    padding: var(--page-pad-y) var(--page-pad-x);
    flex-wrap: wrap;
    text-align: center;
    align-items: stretch;
}

.info-intro {
    flex: 1 1 100%;
    margin-bottom: 12px;
}

.info-intro p {
    font-size: clamp(16px, 1.7vw, 20px);
    color: var(--color-primary);
    line-height: 1.7;
    max-width: 860px;
    margin: 0 auto;
}

.info-box {
    background: var(--color-surface);
    padding: clamp(20px, 2.5vw, 32px);
    flex: 1 1 240px;
    min-width: 0;
    border-radius: var(--radius-md);
    box-shadow: 0 2px 12px var(--color-shadow);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    display: flex;
    flex-direction: column;
}

.info-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 28px var(--color-shadow-strong);
}

.info-box h3 {
    font-size: clamp(17px, 1.7vw, 21px);
    color: var(--color-primary);
    margin-bottom: 14px;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.info-box p {
    font-size: clamp(14px, 1.25vw, 16px);
    color: var(--color-text-muted);
    line-height: 1.85;
    margin-bottom: 16px;
}

.info-box p:last-child {
    margin-bottom: 0;
}

.info-box ul {
    padding: 0;
    display: inline-block;
    text-align: left;
    list-style: none;
    line-height: 1.9;
    font-size: clamp(14px, 1.25vw, 16px);
    color: var(--color-text-muted);
}

.info-box ul li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.info-box ul li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-size: 10px;
    top: 4px;
}

/* === EVENT CARDS === */
.event-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.event-card {
    color: var(--color-text);
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex: 1 1 120px;
    min-width: 0;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    box-shadow: 0 2px 8px var(--color-shadow);
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 22px var(--color-shadow-strong);
}

.event-card img {
    width: 100%;
    height: clamp(80px, 10vw, 120px);
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.event-card:hover img {
    transform: scale(1.04);
}

.event-card h4 {
    padding: 10px 12px 4px;
    color: var(--color-primary);
    font-size: clamp(13px, 1.2vw, 15px);
    font-weight: 700;
}

.event-card p {
    padding: 0 12px 10px;
    color: var(--color-text-subtle);
    font-size: clamp(12px, 1.1vw, 14px);
    margin-bottom: 0;
}

/* === FOOTER === */
.footer {
    background: var(--color-primary);
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: clamp(22px, 3vw, 32px) var(--page-pad-x);
}

.footer-left p {
    font-size: clamp(13px, 1.2vw, 15px);
    margin-bottom: 5px;
    opacity: 0.92;
    transition: opacity var(--transition-fast);
}

.footer-left p:hover {
    opacity: 1;
}

.footer-left p:last-child {
    margin-bottom: 0;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.footer-right a {
    display: flex;
    align-items: center;
    transition: transform var(--transition-base), opacity var(--transition-fast);
}

.footer-right a:hover {
    transform: translateY(-2px);
    opacity: 0.82;
}

.footer-right img {
    height: clamp(24px, 3vw, 30px);
    width: auto;
}

/* === PAGE CONTAINER — shared layout for offer, gallery, heritage, and similar pages === */
.page-container {
    display: block;
    padding: var(--page-pad-y) var(--page-pad-x);
    max-width: 1200px;
    margin: 0 auto;
}

/* === CONTENT ROWS — alternating image/text layout within .page-container === */
.content-row {
    display: flex;
    align-items: stretch;
    gap: clamp(20px, 3.5vw, 44px);
    margin-bottom: clamp(28px, 4vw, 48px);
}

.content-row:last-child {
    margin-bottom: 0;
}

.content-row:nth-child(even) {
    flex-direction: row-reverse;
}

.content-row .info-box {
    flex: 1 1 0;
    text-align: center;
    justify-content: center;
}

.content-row .content-image {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: 0 6px 24px var(--color-shadow-strong);
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: center;
}

.content-row .content-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
    transition: transform var(--transition-slow);
}

.content-row:hover .content-image img {
    transform: scale(1.03);
}

/* === GALLERY ROWS — full-width image pairs within .page-container === */
.gallery-row {
    display: flex;
    align-items: stretch;
    gap: clamp(20px, 3.5vw, 44px);
    margin-bottom: clamp(28px, 4vw, 48px);
}

.gallery-row:last-child {
    margin-bottom: 0;
}

.gallery-image {
    flex: 1 1 0;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: 0 6px 24px var(--color-shadow-strong);
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
    display: block;
    transition: transform var(--transition-slow);
}

.gallery-image:hover img {
    transform: scale(1.03);
}

/* === IMAGE SIZE CONTROLS === */

/* Prevent container from stretching images */
.content-row .content-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* img-sm/md/lg/xl applied to .content-image shrinks the container itself */
.content-image.img-sm {
    flex: 0 1 260px !important;
    max-width: 260px;
}
.content-row:has(.img-sm) {
    justify-content: center;
}

.content-image.img-md {
    flex: 0 1 420px !important;
    max-width: 420px;
}
.content-row:has(.img-md) {
    justify-content: center;
}

.content-image.img-lg {
    flex: 0 1 620px !important;
    max-width: 620px;
}
.content-image.img-xl {
    flex: 0 1 820px !important;
    max-width: 820px;
}

/* Legacy: if img-sm etc. are on the <img> itself */
.content-image img.img-sm { max-width: 260px; width: auto; }
.content-image img.img-md { max-width: 420px; width: auto; }
.content-image img.img-lg { max-width: 620px; width: auto; }
.content-image img.img-xl { max-width: 820px; width: auto; }

/* === MOBILE BREAKPOINT === */
@media (max-width: 700px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero {
        flex-direction: column;
    }

    .hero-text,
    .hero-image {
        flex: unset;
        width: 100%;
    }

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

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

    .event-card {
        flex: unset;
        width: 100%;
    }

    .content-row,
    .content-row:nth-child(even) {
        flex-direction: column;
        gap: 16px;
        align-items: center;
    }

    .content-row .content-image {
        width: 100%;
        max-width: 100% !important;
        flex: unset;
        min-height: auto;
        box-shadow: none;
    }

    .content-row .content-image img {
        width: 100%;
        height: auto;
        min-height: auto;
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .footer {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}