*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-primary: #8B4513;
    --color-primary-dark: #654321;
    --color-primary-light: #A0522D;
    --color-secondary: #D4AF37;
    --color-accent: #CD853F;
    --color-dark: #1a1a1a;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-bg: #F5F5DC;
    --color-bg-alt: #E8E8D3;
    --color-white: #ffffff;
    --font-heading: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-accent: 'Merriweather', Georgia, serif;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.2);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    overflow-x: hidden;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.125rem; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--color-bg-alt);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-content span {
    font-family: var(--font-accent);
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(139, 69, 19, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 0;
    transition: all var(--transition);
}

.site-header.scrolled {
    padding: 8px 0;
    box-shadow: var(--shadow-md);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-white);
}

.logo-accent {
    color: var(--color-secondary);
}

.main-nav {
    display: none;
}

@media (min-width: 992px) {
    .main-nav {
        display: block;
    }
}

.nav-list {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-list a {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 8px 0;
    position: relative;
    transition: color var(--transition);
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: width var(--transition);
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--color-white);
}

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

.has-dropdown {
    position: relative;
}

.has-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--color-white);
    min-width: 220px;
    padding: 12px 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    list-style: none;
}

.has-dropdown:hover .dropdown-menu,
.has-dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: var(--color-text);
    font-size: 0.875rem;
}

.dropdown-menu a:hover {
    background: var(--color-bg);
    color: var(--color-primary);
}

.dropdown-menu a::after {
    display: none;
}

.burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

@media (min-width: 992px) {
    .burger-menu {
        display: none;
    }
}

.burger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: all var(--transition);
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-white);
    z-index: 1001;
    transition: right var(--transition);
    overflow-y: auto;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-content {
    padding: 20px;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-bg-alt);
    margin-bottom: 20px;
}

.mobile-nav-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.mobile-nav-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-light);
    line-height: 1;
}

.mobile-nav-list {
    list-style: none;
}

.mobile-nav-list > li {
    border-bottom: 1px solid var(--color-bg-alt);
}

.mobile-nav-list > li > a,
.mobile-dropdown-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    color: var(--color-text);
    font-weight: 500;
    cursor: pointer;
}

.mobile-dropdown-menu {
    list-style: none;
    padding-left: 16px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
}

.mobile-dropdown.active .mobile-dropdown-menu {
    max-height: 300px;
}

.mobile-dropdown.active .arrow {
    transform: rotate(45deg);
}

.arrow {
    transition: transform var(--transition);
}

.mobile-dropdown-menu a {
    display: block;
    padding: 12px 0;
    color: var(--color-text-light);
    font-size: 0.9375rem;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

.main-content {
    padding-top: 64px;
}

.hero-section {
    position: relative;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, #654321 0%, #8B4513 50%, #A0522D 100%);
    overflow: hidden;
    padding: 120px 20px 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://upload.wikimedia.org/wikipedia/commons/thumb/4/4a/Buda_Castle_Budapest.jpg/1600px-Buda_Castle_Budapest.jpg') center/cover no-repeat;
    opacity: 0.25;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 24px;
}

.hero-tagline {
    display: inline-block;
    font-family: var(--font-accent);
    font-size: 1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 16px;
}

.hero-content h1 {
    color: var(--color-white);
    margin-bottom: 24px;
}

.hero-content h1 .highlight {
    color: var(--color-secondary);
}

.hero-content p {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.9);
    max-width: 700px;
    margin: 0 auto 32px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--color-secondary);
    color: var(--color-dark);
}

.btn-primary:hover {
    background: #E5C158;
    color: var(--color-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

.section-label {
    display: inline-block;
    font-family: var(--font-accent);
    font-size: 0.875rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.section-header {
    margin-bottom: 48px;
}

.section-header.centered {
    text-align: center;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    color: var(--color-text-light);
    font-size: 1.0625rem;
}

.castles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 80px;
}

.castle-card {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.castle-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.castle-card-image {
    width: 100%;
    height: 240px;
    object-fit: cover;
}

.castle-card-content {
    padding: 28px;
}

.castle-card h3 {
    margin-bottom: 12px;
    color: var(--color-primary);
}

.castle-card p {
    color: var(--color-text-light);
    margin-bottom: 16px;
    font-size: 0.9375rem;
}

.castle-card-link {
    color: var(--color-primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.castle-card-link:hover {
    color: var(--color-primary-dark);
}

.page-hero {
    position: relative;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #654321 0%, #8B4513 100%);
    padding: 120px 20px 60px;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.page-hero h1 {
    color: var(--color-white);
    margin-bottom: 16px;
}

.page-hero p {
    color: rgba(255,255,255,0.9);
    font-size: 1.125rem;
}

.contact-intro {
    padding: 60px 0;
    background: var(--color-bg);
    text-align: center;
}

.contact-intro-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-intro-content p {
    color: var(--color-text-light);
    font-size: 1.125rem;
    line-height: 1.8;
}

.contact-cards-section {
    padding: 0 0 80px;
    background: var(--color-bg);
}

.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }
}

.contact-card {
    background: var(--color-white);
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-bg-alt);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-card-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.25rem;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-card-icon svg {
    width: 28px;
    height: 28px;
    fill: var(--color-secondary);
}

.contact-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-dark);
}

.contact-card p {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.contact-card a {
    color: var(--color-primary);
    font-weight: 500;
    word-break: break-word;
    text-decoration: underline;
}

.contact-card a:hover {
    color: var(--color-primary-dark);
}

.faq-section {
    background: var(--color-white);
    padding: 80px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.faq-title {
    text-align: center;
    margin-bottom: 2.5rem;
}

.faq-item {
    background: var(--color-bg);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--color-dark);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--color-primary);
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.5rem 1.25rem;
}

.faq-answer p {
    color: var(--color-text-light);
    line-height: 1.7;
}

.article-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 20px;
    background: var(--color-white);
}

.article-content img {
    width: 100%;
    border-radius: var(--radius-md);
    margin: 32px 0;
    box-shadow: var(--shadow-md);
}

.article-content h2 {
    margin-top: 48px;
    margin-bottom: 16px;
    color: var(--color-primary);
}

.article-content h3 {
    margin-top: 32px;
    margin-bottom: 12px;
}

.article-content p {
    margin-bottom: 20px;
    color: var(--color-text);
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin: 20px 0 20px 24px;
    color: var(--color-text);
}

.article-content li {
    margin-bottom: 12px;
    line-height: 1.7;
}

.site-footer {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,0.8);
    padding: 60px 0 24px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-logo svg {
    width: 32px;
    height: 32px;
}

.footer-logo .accent {
    color: var(--color-secondary);
}

.footer-section p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
    line-height: 1.7;
}

.footer-section h4 {
    color: var(--color-white);
    margin-bottom: 16px;
    font-size: 1.125rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
    transition: color var(--transition);
}

.footer-section ul li a:hover {
    color: var(--color-secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-bottom p {
    color: rgba(255,255,255,0.6);
    font-size: 0.875rem;
}

.footer-bottom a {
    color: rgba(255,255,255,0.7);
}

.footer-bottom a:hover {
    color: var(--color-secondary);
}

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-white);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 9998;
    padding: 24px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.visible {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.cookie-text h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.cookie-text p {
    color: var(--color-text-light);
    font-size: 0.9375rem;
}

.cookie-text a {
    color: var(--color-primary);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.cookie-accept {
    background: var(--color-primary);
    color: var(--color-white);
}

.cookie-accept:hover {
    background: var(--color-primary-dark);
}

.cookie-reject {
    background: var(--color-bg-alt);
    color: var(--color-text);
}

.cookie-reject:hover {
    background: var(--color-bg);
}

.cookie-settings {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.cookie-settings:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    padding: 20px;
}

.cookie-settings-modal.visible {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-content {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid var(--color-bg-alt);
}

.cookie-modal-header h3 {
    font-size: 1.25rem;
}

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text-light);
    line-height: 1;
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid var(--color-bg-alt);
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option-info h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.cookie-option-info p {
    color: var(--color-text-light);
    font-size: 0.875rem;
}

.cookie-toggle {
    position: relative;
    width: 48px;
    height: 24px;
    cursor: pointer;
}

.cookie-toggle.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-alt);
    border-radius: 24px;
    transition: var(--transition);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: var(--color-white);
    border-radius: 50%;
    transition: var(--transition);
}

.cookie-toggle input:checked + .toggle-slider {
    background: var(--color-primary);
}

.cookie-toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.cookie-modal-footer {
    padding: 24px;
    border-top: 1px solid var(--color-bg-alt);
    text-align: right;
}

.cookie-save {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
}

.cookie-save:hover {
    background: var(--color-primary-dark);
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 70vh;
        padding: 100px 20px 60px;
    }
    
    .castles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .cookie-content {
        text-align: center;
    }
}
