:root {
    --color-primary: #c45c26;
    --color-primary-dark: #9a4520;
    --color-secondary: #2d5016;
    --color-accent: #d4a843;
    --color-dark: #1a1a2e;
    --color-text: #333;
    --color-muted: #6c757d;
    --color-light: #f8f5f0;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', system-ui, sans-serif;
    --nav-height: 72px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    --radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    padding-top: var(--nav-height);
    background: #fff;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-display);
    font-weight: 700;
}

/* Navbar */
#mainNav {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.75rem 0;
    transition: background 0.3s, box-shadow 0.3s;
}

#mainNav.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.navbar-brand {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 700;
}

.brand-logo {
    height: 42px;
    width: auto;
    max-width: min(180px, 48vw);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    padding: 4px 10px;
    border-radius: 8px;
    flex-shrink: 0;
}

.hero-logo {
    width: min(100%, 340px);
    height: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.96);
    padding: 1rem 1.25rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.footer-logo {
    width: min(100%, 220px);
    height: auto;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.65rem 0.85rem;
    border-radius: 12px;
}

.welcome-logo {
    max-width: 280px;
    margin: 0 auto;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 0.85rem !important;
    transition: color 0.2s;
}

.nav-link.active,
.nav-link:hover {
    color: var(--color-accent) !important;
}

.lang-switch .btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

/* Hero */
.hero-section {
    position: relative;
    min-height: calc(100vh - var(--nav-height));
    background: url('../images/admin-edificio.png') center/cover no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26, 26, 46, 0.85) 0%, rgba(45, 80, 22, 0.6) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    background: rgba(212, 168, 67, 0.2);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    padding: 0.35rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.35rem;
    opacity: 0.95;
    margin-bottom: 1rem;
}

.hero-intro {
    font-size: 1.1rem;
    opacity: 0.85;
    max-width: 650px;
    margin: 0 auto 2rem;
}

.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 600;
    padding: 0.65rem 1.5rem;
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
}

/* Sections */
.section-padding {
    padding: 5rem 0;
}

.section-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.bg-accent {
    background: var(--color-light);
}

/* Feature cards */
.feature-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.75rem;
    color: #fff;
}

.feature-icon.nature { background: var(--color-secondary); }
.feature-icon.culture { background: var(--color-primary); }
.feature-icon.history { background: var(--color-dark); }

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
}

/* Preview cards */
.preview-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    color: inherit;
}

.preview-card:hover {
    transform: scale(1.02);
}

.preview-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.preview-card-body {
    padding: 1.25rem;
    background: #fff;
}

.preview-card-body h4 {
    font-size: 1.1rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
    color: var(--color-dark);
}

/* Page hero */
.page-hero {
    padding: 4rem 0 3rem;
    color: #fff;
    background: linear-gradient(135deg, var(--color-dark), var(--color-secondary));
}

.page-hero h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 0.5rem;
}

.page-hero-sub {
    opacity: 0.9;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.page-hero-about { background: linear-gradient(135deg, #1a1a2e, #3d2c5a); }
.page-hero-tourism { background: linear-gradient(135deg, #2d5016, #1a1a2e); }
.page-hero-culture { background: linear-gradient(135deg, #9a4520, #2d5016); }
.page-hero-gallery { background: linear-gradient(135deg, #1a1a2e, #c45c26); }
.page-hero-visitors { background: linear-gradient(135deg, #2d5016, #1a1a2e); }
.page-hero-contact { background: linear-gradient(135deg, #1a1a2e, #9a4520); }

.breadcrumb {
    margin-bottom: 0;
}

.breadcrumb-item a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--color-accent);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* Info blocks */
.info-block {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    height: 100%;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--color-primary);
}

.info-icon {
    width: 48px;
    height: 48px;
    background: rgba(196, 92, 38, 0.1);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.info-block h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Stats */
.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem 1rem;
    box-shadow: var(--shadow);
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    color: var(--color-muted);
    font-size: 0.9rem;
}

/* Tourism cards */
.tourism-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.tourism-card:hover {
    transform: translateY(-4px);
}

.tourism-card-img {
    position: relative;
}

.tourism-card-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.tourism-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--color-primary);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tourism-card-body {
    padding: 1.5rem;
}

.tourism-card-body h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Culture */
.culture-icon {
    width: 56px;
    height: 56px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.culture-content h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.culture-image img {
    width: 100%;
    height: 320px;
    object-fit: cover;
}

/* Gallery */
.gallery-item {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    background: none;
}

.gallery-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 26, 46, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: #fff;
    font-size: 2rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.video-placeholder {
    background: var(--color-dark);
}

.video-placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 2rem;
}

.video-placeholder-inner i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
}

/* Visitors */
.visitor-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.visitor-icon {
    width: 52px;
    height: 52px;
    background: rgba(45, 80, 22, 0.1);
    color: var(--color-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

.visitor-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.map-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    min-height: 280px;
}

.map-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Contact */
.contact-info-card,
.contact-form-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    height: 100%;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info-item:last-child {
    margin-bottom: 0;
}

.contact-info-item > i {
    width: 44px;
    height: 44px;
    background: rgba(196, 92, 38, 0.1);
    color: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    font-family: var(--font-body);
    font-weight: 600;
}

.contact-info-item p {
    margin: 0;
    color: var(--color-muted);
}

.contact-form-card h3 {
    margin-bottom: 1.5rem;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(196, 92, 38, 0.15);
}

/* Admin spotlight */
.admin-spotlight {
    background: linear-gradient(180deg, #fff 0%, var(--color-light) 100%);
}

.admin-spotlight-card {
    background: #fff;
    border-radius: calc(var(--radius) + 4px);
    overflow: hidden;
    box-shadow: 0 12px 48px rgba(26, 26, 46, 0.12);
    border: 1px solid rgba(196, 92, 38, 0.12);
}

.admin-photo-panel {
    position: relative;
    height: 100%;
    min-height: 360px;
    background: var(--color-dark);
}

.admin-photo-main {
    width: 100%;
    height: 100%;
    min-height: 360px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.admin-photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(transparent, rgba(26, 26, 46, 0.92));
    color: #fff;
}

.admin-photo-caption .admin-role {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-accent);
    margin-bottom: 0.25rem;
}

.admin-photo-caption strong {
    font-family: var(--font-display);
    font-size: 1.2rem;
}

.admin-content-panel {
    padding: clamp(1.5rem, 4vw, 3rem);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.admin-eyebrow {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.75rem;
}

.admin-title {
    font-size: clamp(1.75rem, 4vw, 2.35rem);
    margin-bottom: 1rem;
    color: var(--color-dark);
}

.admin-message {
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.admin-highlights {
    display: grid;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.admin-highlight-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    background: var(--color-light);
    border-radius: var(--radius);
    border-left: 3px solid var(--color-primary);
}

.admin-highlight-item i {
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-top: 0.1rem;
}

.admin-mini-photo {
    width: 100%;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid #fff;
    box-shadow: var(--shadow);
}

.gallery-item-featured {
    outline: 3px solid var(--color-primary);
    outline-offset: 2px;
}

.gallery-featured-badge {
    position: absolute;
    top: 0.65rem;
    left: 0.65rem;
    background: var(--color-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.welcome-image img {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
}

/* Footer */
.site-footer {
    background: var(--color-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 2rem;
}

.footer-brand {
    font-family: var(--font-display);
    color: #fff;
    margin-bottom: 1rem;
}

.footer-text {
    font-size: 0.95rem;
    line-height: 1.7;
}

.site-footer h6 {
    color: var(--color-accent);
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.footer-links a,
.footer-contact li {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 2;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-contact i {
    margin-right: 0.5rem;
    color: var(--color-primary);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 2rem 0 1.5rem;
}

.footer-bottom {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-tagline {
    color: var(--color-accent);
    font-style: italic;
}

/* Responsive */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

img,
video,
iframe,
svg {
    max-width: 100%;
    height: auto;
}

main {
    overflow-x: hidden;
}

.container {
    padding-left: max(1rem, env(safe-area-inset-left));
    padding-right: max(1rem, env(safe-area-inset-right));
}

@media (max-width: 991.98px) {
    :root {
        --nav-height: 64px;
    }

    #mainNav {
        padding: 0.5rem 0;
    }

    .navbar-brand {
        font-size: 1.15rem;
    }

    .brand-logo {
        height: 36px;
        max-width: 150px;
        padding: 3px 8px;
    }

    .hero-logo {
        width: min(100%, 280px);
        padding: 0.85rem 1rem;
    }

    .footer-logo {
        width: min(100%, 190px);
    }

    .navbar-collapse {
        background: var(--color-dark);
        padding: 0.75rem 1rem 1rem;
        border-radius: var(--radius);
        margin-top: 0.75rem;
        max-height: calc(100dvh - var(--nav-height) - 1rem);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .navbar-nav {
        gap: 0.15rem;
    }

    .navbar-nav .nav-item {
        width: 100%;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 0.5rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        font-size: 0.95rem;
    }

    .navbar-nav .nav-item:last-of-type .nav-link {
        border-bottom: none;
    }

    .lang-switch {
        margin-top: 0.75rem;
        justify-content: center;
    }

    .lang-switch .btn {
        flex: 1;
        max-width: 4rem;
    }
}

@media (max-width: 767.98px) {
    :root {
        --nav-height: 60px;
    }

    body {
        padding-top: var(--nav-height);
    }

    .section-padding {
        padding: 2.75rem 0;
    }

    .section-title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }

    .page-hero {
        padding: 2.5rem 0 2rem;
    }

    .page-hero-sub {
        font-size: 1rem;
    }

    .breadcrumb {
        flex-wrap: wrap;
        font-size: 0.85rem;
    }

    .hero-section {
        min-height: auto;
    }

    .hero-content .row.min-vh-100 {
        min-height: calc(100dvh - var(--nav-height)) !important;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
    }

    .hero-subtitle {
        font-size: clamp(1rem, 4.5vw, 1.25rem);
    }

    .hero-intro {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-actions .btn {
        display: block;
        width: 100%;
        margin: 0 !important;
    }

    .feature-card,
    .info-block,
    .visitor-card,
    .contact-info-card,
    .contact-form-card,
    .stat-card {
        padding: 1.25rem;
    }

    .feature-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    .stat-label {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .preview-card img,
    .tourism-card-img img {
        height: 180px;
    }

    .culture-image img {
        height: 220px;
    }

    .gallery-item img {
        height: 140px;
    }

    .culture-block {
        margin-bottom: 2.5rem !important;
    }

    .contact-info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .contact-form-card .btn-lg,
    .hero-actions .btn-lg {
        width: 100%;
    }

    .site-footer {
        padding: 2.5rem 0 1.5rem;
        text-align: center;
    }

    .footer-links,
    .footer-contact {
        margin-bottom: 0;
    }

    .footer-contact li {
        line-height: 1.6;
        margin-bottom: 0.5rem;
    }

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

    .map-container {
        min-height: 240px;
        aspect-ratio: 4 / 3;
    }

    .video-placeholder-inner {
        padding: 1.25rem;
    }

    .video-placeholder-inner i {
        font-size: 2.25rem;
    }

    .video-placeholder-inner p {
        font-size: 0.9rem;
        margin-bottom: 0;
    }
}

@media (max-width: 575.98px) {
    .admin-photo-panel,
    .admin-photo-main {
        min-height: 300px;
    }

    .admin-content-panel {
        padding: 1.5rem;
    }

    .admin-mini-photo {
        height: 72px;
    }

    .gallery-grid .col-6:first-child {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .gallery-item-featured img {
        height: 260px;
    }

    .tourism-card-body h3,
    .culture-content h2 {
        font-size: 1.15rem;
    }

    .preview-card-body h4 {
        font-size: 1rem;
    }

    .navbar-brand .brand-text {
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-logo {
        width: min(100%, 240px);
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .culture-image img {
        height: 280px;
    }

    .map-container {
        min-height: 360px;
    }
}

@media (hover: none) {
    .feature-card:hover,
    .tourism-card:hover,
    .preview-card:hover {
        transform: none;
    }

    .gallery-item:hover img {
        transform: none;
    }

    .gallery-overlay {
        opacity: 1;
        background: rgba(26, 26, 46, 0.25);
        font-size: 1.5rem;
    }
}
