/* ============================
   CSS Variables & Reset
   ============================ */
:root {
    --color-primary: #1b2a3d;
    --color-primary-dark: #111d2b;
    --color-accent: #b8860b;
    --color-accent-hover: #d4a017;
    --color-accent-light: rgba(184, 134, 11, 0.08);
    --color-bg: #fdfcfa;
    --color-bg-alt: #f3f0ea;
    --color-text: #2d2d2d;
    --color-text-light: #5a5a5a;
    --color-text-inverse: #f5f2ed;
    --color-border: #ddd8ce;
    --color-card-shadow: rgba(27, 42, 61, 0.06);
    --font-heading: 'Playfair Display', 'Georgia', 'Times New Roman', serif;
    --font-body: 'Georgia', 'Times New Roman', serif;
    --font-ui: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --header-height: 72px;
    --container-width: 1100px;
    --transition: 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.75;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent-hover);
}

/* ============================
   Scroll Animations
   ============================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* ============================
   Layout
   ============================ */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================
   Header & Navigation
   ============================ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(27, 42, 61, 0.97);
    backdrop-filter: blur(8px);
    z-index: 100;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.nav__logo {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--color-text-inverse);
    letter-spacing: 0.3px;
}

.nav__logo:hover {
    color: var(--color-accent);
}

.nav__menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav__link {
    font-family: var(--font-ui);
    font-size: 0.9rem;
    color: rgba(245, 242, 237, 0.8);
    padding: 8px 18px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: background-color var(--transition), color var(--transition);
}

.nav__link:hover,
.nav__link.active {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--color-text-inverse);
}

.nav__link.active {
    background-color: rgba(184, 134, 11, 0.2);
    color: var(--color-accent-hover);
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-text-inverse);
    transition: transform var(--transition), opacity var(--transition);
}

/* ============================
   Hero Section
   ============================ */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        linear-gradient(160deg, rgba(17, 29, 43, 0.88) 0%, rgba(27, 42, 61, 0.82) 100%),
        url('images/hero-bg.jpg') center / cover no-repeat;
    color: var(--color-text-inverse);
    padding: calc(var(--header-height) + 60px) 24px 80px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to top, var(--color-bg), transparent);
    pointer-events: none;
}

.hero__content {
    max-width: 700px;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.hero__subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    color: rgba(245, 242, 237, 0.75);
    margin-bottom: 44px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary-dark);
    background-color: var(--color-accent);
    color: #fff;
    padding: 15px 40px;
    border-radius: 4px;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: background-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn:hover {
    background-color: var(--color-accent-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(184, 134, 11, 0.3);
}

/* ============================
   Sections (General)
   ============================ */
.section {
    padding: 96px 0;
}

.section--alt {
    background-color: var(--color-bg-alt);
}

.section__title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--color-primary);
    text-align: center;
    margin-bottom: 16px;
    position: relative;
}

.section__title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
    margin: 20px auto 48px;
    border-radius: 2px;
}

/* ============================
   Parallax Dividers
   ============================ */
.divider {
    position: relative;
    height: 340px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.divider__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(17, 29, 43, 0.75) 0%, rgba(27, 42, 61, 0.65) 100%);
}

.divider__quote {
    position: relative;
    z-index: 1;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    color: rgba(245, 242, 237, 0.9);
    text-align: center;
    max-width: 600px;
    padding: 0 24px;
    line-height: 1.5;
    letter-spacing: 0.3px;
}

/* 
   KÉPEK BEÁLLÍTÁSA:
   Cseréld ki az alábbi URL-eket saját képekre,
   vagy tölts le ingyenes fotókat az unsplash.com-ról.
   Keresési tippek: "old documents", "family tree", "archive books"
*/
#divider-1 {
    background-image: url('images/divider-1.jpg');
    background-color: #3a3228;
}

#divider-2 {
    background-image: url('images/divider-2.jpg');
    background-color: #2e3828;
}

#divider-3 {
    background-image: url('images/divider-3.jpg');
    background-color: #28313a;
}

@media (max-width: 768px) {
    .divider {
        height: 240px;
        background-attachment: scroll;
    }

    .divider__quote {
        font-size: 1.2rem;
    }
}

/* ============================
   About Section
   ============================ */
.about__content {
    max-width: 720px;
    margin: 0 auto;
}

.about__content p {
    margin-bottom: 24px;
    color: var(--color-text);
    font-size: 1.05rem;
}

.about__content p:first-child::first-letter {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    float: left;
    line-height: 1;
    margin-right: 10px;
    margin-top: 4px;
    color: var(--color-accent);
    font-weight: 700;
}

.about__content p:last-child {
    margin-bottom: 0;
}

/* ============================
   Services Section
   ============================ */
.services__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.service-card {
    background-color: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 40px 32px;
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-accent-hover));
    opacity: 0;
    transition: opacity var(--transition);
}

.service-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: transparent;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card__icon {
    font-size: 2.4rem;
    margin-bottom: 20px;
    display: inline-block;
    background: var(--color-accent-light);
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    border-radius: 12px;
}

.service-card__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 12px;
}

.service-card__text {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-light);
}

/* ============================
   Contact Section
   ============================ */
.contact__content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact__intro {
    margin-bottom: 40px;
    color: var(--color-text);
    font-size: 1.05rem;
}

.contact__details {
    display: flex;
    flex-direction: row;
    gap: 24px;
    align-items: stretch;
    justify-content: center;
}

.contact__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background-color: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 24px 32px;
    width: 100%;
    max-width: 400px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.contact__item:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.contact__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact__icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.contact__label {
    display: block;
    font-family: var(--font-ui);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-light);
    margin-bottom: 4px;
}

.contact__value {
    font-family: var(--font-ui);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-primary);
    transition: color var(--transition);
}

.contact__value:hover {
    color: var(--color-accent);
}

/* ============================
   Back to Top Button
   ============================ */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background-color: var(--color-accent);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background-color var(--transition);
    box-shadow: var(--shadow-md);
    z-index: 90;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background-color: var(--color-accent-hover);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }
}

/* ============================
   Footer
   ============================ */
.footer {
    background-color: var(--color-primary-dark);
    color: rgba(245, 242, 237, 0.5);
    text-align: center;
    padding: 28px;
    font-family: var(--font-ui);
    font-size: 0.82rem;
    letter-spacing: 0.3px;
}

/* ============================
   Mobile Responsive
   ============================ */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .nav__toggle {
        display: flex;
    }

    .nav__menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        flex-direction: column;
        background-color: rgba(27, 42, 61, 0.98);
        backdrop-filter: blur(8px);
        padding: 16px 0;
        gap: 0;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: transform var(--transition), opacity var(--transition);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .nav__menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav__link {
        display: block;
        padding: 14px 24px;
        border-radius: 0;
        font-size: 1rem;
    }

    .nav__toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav__toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav__toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        min-height: 75vh;
        padding-top: calc(var(--header-height) + 40px);
        padding-bottom: 60px;
    }

    .hero__title {
        font-size: 2.2rem;
    }

    .hero__subtitle {
        font-size: 1.05rem;
    }

    .section {
        padding: 64px 0;
    }

    .section__title {
        font-size: 1.7rem;
        margin-bottom: 12px;
    }

    .services__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 28px 24px;
    }

    .contact__item {
        padding: 16px 24px;
        max-width: 100%;
    }

    .contact__details {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 380px) {
    .hero__title {
        font-size: 1.7rem;
    }

    .container {
        padding: 0 16px;
    }
}
