/*
Theme Name: Főnix Egyesület Téma
Theme URI: http://www.fonixdokuegyesulet.hu
Author: Gemini Collaborator
Description: Egyedi, letisztult téma a Főnix Építészeti Dokumentációs Egyesület számára.
Version: 1.0.3
License: GNU General Public License v2 or later
Text Domain: fonix-theme
*/

@view-transition {
    navigation: auto;
}

:root {
    --paper: #ffffff;
    --paper-2: #faf7f2;
    --ink: #1b1815;
    --muted: #6e6862;
    --line: #e6ded4;
    --red: #b32b22;
    --red-deep: #7e1a14;
    --red-tint: #f8ebe8;
    --maxw: 1180px;
    --display: "Fraunces", Georgia, serif;
    --body: "Inter", system-ui, sans-serif;
    --mono: "Space Mono", ui-monospace, monospace;
}

* {
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--body);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a {
    color: inherit;
    text-decoration: none;
}
img {
    max-width: 100%;
    height: auto;
    display: block;
}
.wrap {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0 28px;
}

.mono {
    font-family: var(--mono);
}
.eyebrow {
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--red);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.eyebrow::before {
    content: "";
    width: 26px;
    height: 1px;
    background: var(--red);
    display: inline-block;
}

h1,
h2,
h3,
h4 {
    font-family: var(--display);
    font-weight: 600;
    line-height: 1.08;
    margin: 0;
    letter-spacing: -0.01em;
}

/* ---------- HEADER & WP MENUS ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: saturate(1.4) blur(8px);
    border-bottom: 1px solid var(--line);
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    height: 78px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.brand .mark {
    width: 42px;
    height: 42px;
    color: var(--red);
    flex-shrink: 0;
}
.brand .word {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.brand .word b {
    font-family: var(--display);
    font-weight: 700;
    font-size: 20px;
    letter-spacing: -0.01em;
}
.brand .word span {
    font-family: var(--mono);
    font-size: 9px;
    letter-spacing: 0.16em;
    color: var(--muted);
    text-transform: uppercase;
    margin-top: 3px;
}

.main-nav {
    margin-left: auto;
}
.menu,
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
    margin: 0;
    padding: 0;
    align-items: center;
}
.menu > li,
.main-nav ul > li {
    position: relative;
}
.menu > li > a,
.main-nav ul > li > a {
    display: block;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 500;
    border-radius: 7px;
    transition:
        background 0.18s,
        color 0.18s;
}
.menu > li > a:hover,
.main-nav ul > li > a:hover,
.menu > li:focus-within > a,
.main-nav ul > li:focus-within > a {
    background: var(--red-tint);
    color: var(--red-deep);
}

/* Submenu WP compatibility */
.menu > li.menu-item-has-children > a::after,
.menu > li.has-sub > a::after {
    content: "›";
    margin-left: 6px;
    color: var(--red);
    transform: rotate(90deg);
    display: inline-block;
    font-size: 13px;
}

.submenu,
.sub-menu {
    list-style: none;
    margin: 0;
    padding: 8px;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 230px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 18px 40px -18px rgba(30, 20, 10, 0.28);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: 0.18s;
    z-index: 99;
}
.menu > li:hover .sub-menu,
.menu > li:focus-within .sub-menu,
.menu > li:hover .submenu,
.menu > li:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.submenu li a,
.sub-menu li a {
    display: block;
    padding: 9px 12px;
    border-radius: 7px;
    font-size: 14.5px;
    color: var(--muted);
    transition: 0.15s;
}
.submenu li a:hover,
.sub-menu li a:hover {
    background: var(--red-tint);
    color: var(--red-deep);
}

.header-social {
    display: flex;
    gap: 4px;
    padding-left: 14px;
    border-left: 1px solid var(--line);
}
.header-social a {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--muted);
    transition: 0.16s;
}
.header-social a:hover {
    background: var(--red);
    color: #fff;
}
.header-social svg {
    width: 17px;
    height: 17px;
}

.nav-toggle {
    display: none;
    margin-left: auto;
    background: none;
    border: 1px solid var(--line);
    border-radius: 9px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    color: var(--ink);
}
.nav-toggle svg {
    width: 22px;
    height: 22px;
    margin: 0 auto;
}

/* ---------- HERO (OPTION A: GRID-ALIGNED + SOFT SKETCH BG) ---------- */
.hero-section {
    position: relative;
    overflow: hidden;
    background-color: var(--paper-2);
    border-bottom: 1px solid var(--line);
    padding: 72px 0 64px;
}
.hero-section::after {
    content: "";
    position: absolute;
    right: 4%;
    bottom: -10px;
    width: 520px;
    height: 100%;
    max-width: 48%;
    background-image: url('hero-bg.png');
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    opacity: 0.22;
    pointer-events: none;
    mask-image: linear-gradient(to left, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,1) 40%, rgba(0,0,0,0) 100%);
}
.hero-inner {
    position: relative;
    z-index: 2;
}
.hero-content {
    max-width: 720px;
}
.hero-content .eyebrow {
    margin-bottom: 18px;
}
.hero-content h1 {
    font-family: var(--display);
    font-size: clamp(32px, 4.5vw, 52px);
    font-weight: 600;
    line-height: 1.14;
    color: var(--ink);
    letter-spacing: -0.015em;
    margin: 0 0 16px;
}
.hero-content .lead {
    font-size: clamp(17px, 2vw, 20px);
    line-height: 1.55;
    color: #403a34;
    margin: 0;
    font-weight: 400;
    max-width: 54ch;
}
@media (max-width: 768px) {
    .hero-section {
        padding: 48px 0 40px;
    }
    .hero-section::after {
        opacity: 0.12;
        width: 80%;
        max-width: 80%;
        right: -10%;
    }
}

/* ---------- SECTIONS ---------- */
.section {
    padding: 82px 0;
}
.section-alt {
    background: var(--paper-2);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.section-head h2 {
    font-size: clamp(28px, 3.4vw, 40px);
    margin-top: 14px;
}
.head-link {
    font-family: var(--mono);
    font-size: 13px;
    letter-spacing: 0.06em;
    color: var(--red);
    white-space: nowrap;
    border-bottom: 1px solid transparent;
    transition: 0.15s;
    padding-bottom: 2px;
}
.head-link:hover {
    border-color: var(--red);
}

/* ---------- NEWS GRID & WP INTEGRATION ---------- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}
.card {
    border: none;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s linear;
    box-shadow: 0 0 20px 0 rgba(148, 148, 148, 0.51);
}
.card:hover {
    background-color: #e7e7e7;
}
.card .thumb {
    aspect-ratio: 16/10;
    position: relative;
    overflow: hidden;
    background: #efe7db;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.card .thumb svg {
    width: 100%;
    height: 100%;
}
.card .thumb .ref {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    padding: 4px 8px;
    color: var(--red-deep);
    z-index: 10;
}
.card .body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
}
.card .meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--body);
    font-size: 14px;
    color: #828282;
    margin-bottom: 20px;
}
.card .tag {
    color: #282828;
}
.card .tag a {
    color: inherit;
    text-decoration: none;
}
.card h3 {
    font-family: var(--display);
    font-size: 18px;
    line-height: 1.18;
    margin-bottom: 10px;
    color: #161616;
}
.card h3 a {
    color: inherit;
    text-decoration: none;
}
.card h3 a:hover {
    color: #828282;
    transition: all linear 0.2s;
}
.card p {
    margin: 0;
    color: #525252;
    font-size: 16px;
    font-weight: 300;
    flex: 1;
}
.card .more {
    display: none; /* Rejtve, hogy a kártya debrecenhazai stílusú legyen */
}

/* ---------- ABOUT + FACEBOOK ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.55fr 1fr;
    gap: 40px;
    align-items: start;
}
.about-text p {
    color: #403a34;
    margin: 0 0 18px;
}
.about-text p:first-of-type {
    font-size: 20px;
    color: var(--ink);
}
.about-stats {
    display: flex;
    gap: 34px;
    margin-top: 28px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}
.stat b {
    font-family: var(--display);
    font-size: 34px;
    font-weight: 600;
    display: block;
    color: var(--red);
    line-height: 1;
}
.stat span {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.fb-box {
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--paper);
}
.fb-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--paper-2);
}
.fb-top .ico {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #1877f2;
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
}
.fb-top b {
    font-family: var(--display);
    font-size: 17px;
}
.fb-top span {
    display: block;
    font-size: 12.5px;
    color: var(--muted);
}
.fb-body {
    padding: 18px;
}
.fb-body .line {
    height: 11px;
    border-radius: 6px;
    background: var(--line);
    margin-bottom: 10px;
}
.fb-body .line.s {
    width: 62%;
}
.fb-body .photo {
    height: 120px;
    border-radius: 9px;
    margin: 14px 0;
    border: 1px solid var(--line);
    overflow: hidden;
}
.fb-btn {
    display: block;
    text-align: center;
    margin: 6px 18px 18px;
    padding: 11px;
    border-radius: 9px;
    background: #1877f2;
    color: #fff;
    font-weight: 600;
    font-size: 14.5px;
}

/* ---------- SUPPORT ---------- */
.support-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-top: 8px;
}
.sup {
    border: none;
    border-radius: 0;
    padding: 26px 24px;
    background: #fff;
    position: relative;
    box-shadow: 0 0 20px 0 rgba(148, 148, 148, 0.51);
    transition: background-color 0.2s linear;
}
.sup:hover {
    background-color: #e7e7e7;
}
.sup .n {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--red);
    letter-spacing: 0.1em;
}
.sup h3 {
    font-size: 20px;
    margin: 12px 0 8px;
}
.sup p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
}
.sup .highlight {
    font-family: var(--mono);
    font-size: 15px;
    color: var(--red-deep);
    background: var(--red-tint);
    display: inline-block;
    padding: 5px 10px;
    border-radius: 7px;
    margin-top: 12px;
}

/* ---------- CONTACT ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.contact-list {
    list-style: none;
    margin: 22px 0 0;
    padding: 0;
}
.contact-list li {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--line);
}
.contact-list li:last-child {
    border-bottom: 1px solid var(--line);
}
.contact-list .k {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    width: 96px;
    flex-shrink: 0;
    padding-top: 3px;
}
.contact-list .v {
    font-size: 16px;
}
.contact-list .v a:hover {
    color: var(--red-deep);
}
.map-plate {
    aspect-ratio: 4/3;
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    background: var(--paper-2);
    position: relative;
}
.map-plate .pin {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -100%);
    color: var(--red);
}
.map-plate .lbl {
    position: absolute;
    left: 16px;
    bottom: 16px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.85);
    padding: 5px 10px;
    border-radius: 6px;
}

/* ---------- ADATBÁZIS OLDAL (CUSTOM WP DESIGN) ---------- */
.db-search-bar {
    background: var(--paper-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 30px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.db-search-bar input,
.db-search-bar select {
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: var(--body);
    font-size: 15px;
    background: #fff;
}
.db-search-bar input[type="text"] {
    flex: 1;
    min-width: 200px;
}
.db-search-bar button {
    background: var(--red);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--body);
    transition: 0.15s;
}
.db-search-bar button:hover {
    background: var(--red-deep);
}

.db-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 50px;
}
.db-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px 24px;
    background: #fff;
    transition: 0.15s;
    gap: 20px;
}
.db-item:hover {
    border-color: var(--red);
    background: var(--paper-2);
}
.db-item-title {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 600;
}
.db-item-meta {
    font-family: var(--mono);
    font-size: 12px;
    color: var(--muted);
    margin-top: 4px;
    display: flex;
    gap: 12px;
}
.db-item-tag {
    background: var(--red-tint);
    color: var(--red-deep);
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
}

/* ---------- FOOTER ---------- */
.site-footer {
    background: var(--ink);
    color: #e9e2d9;
    padding: 56px 0 30px;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 34px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-brand {
    flex: 1 1 360px;
    max-width: 520px;
}
.footer-logo-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}
.footer-logo-row .mark {
    width: 48px;
    height: 48px;
    color: var(--red);
    flex-shrink: 0;
    margin-top: 2px;
}
.footer-title-group b {
    font-family: var(--display);
    font-size: 20px;
    line-height: 1.25;
    color: #ffffff;
    display: block;
}
.footer-title-group .tagline {
    color: #a49b8f;
    font-size: 13.5px;
    line-height: 1.4;
    margin: 6px 0 0;
}
.footer-info-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 14px;
}
.footer-info-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    color: #d1c8bd;
}
.footer-info-list strong {
    color: #a49b8f;
    font-family: var(--mono);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    min-width: 130px;
}
.footer-info-list a {
    color: #ffffff;
    text-decoration: none;
    transition: 0.15s;
}
.footer-info-list a:hover {
    color: var(--red);
}
.footer-map-container {
    flex: 1 1 320px;
    max-width: 460px;
}
.footer-map-container h4 {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #a49b8f;
    margin: 0 0 12px;
    font-weight: 400;
}
.footer-map-wrapper {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
    background: #2a2622;
}
.footer-map-wrapper iframe {
    display: block;
    width: 100%;
}
.footer-map-caption {
    font-size: 12.5px;
    color: #a49b8f;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}
.footer-social a {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #e9e2d9;
    transition: 0.18s;
}
.footer-social a:hover {
    background: var(--red);
    border-color: var(--red);
}
.footer-social svg {
    width: 18px;
    height: 18px;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    padding-top: 24px;
    font-size: 13px;
    color: #a49b8f;
}
.footer-bottom a {
    color: inherit;
    text-decoration: none;
}
.footer-bottom a:hover {
    color: var(--red);
}
.footer-bottom-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: inline-flex;
    gap: 12px;
}
.footer-bottom-links li {
    display: inline;
}
.footer-bottom-links li + li:before {
    content: "· ";
    margin-right: 8px;
    color: #a49b8f;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 940px) {
    .hero-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }
    .hero-plate {
        max-width: 360px;
    }
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .news-grid,
    .support-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 760px) {
    .main-nav {
        position: fixed;
        inset: 78px 0 auto 0;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        margin: 0;
        box-shadow: 0 20px 30px -20px rgba(0, 0, 0, 0.25);
    }
    .main-nav.open {
        max-height: 80vh;
        overflow: auto;
    }
    .menu,
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 20px 24px;
        gap: 2px;
    }
    .menu > li > a,
    .main-nav ul > li > a {
        padding: 13px 8px;
        font-size: 16px;
        border-radius: 8px;
    }
    .menu > li.menu-item-has-children > a::after {
        float: right;
    }
    .submenu,
    .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0 0 6px 12px;
        min-width: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s;
    }
    .menu > li.expanded .sub-menu {
        max-height: 600px;
    }
    .header-social {
        display: none;
    }
    .nav-toggle {
        display: grid;
    }
    .news-grid,
    .support-grid {
        grid-template-columns: 1fr;
    }
    .section {
        padding: 60px 0;
    }
    .footer-cols {
        gap: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- PAGELAYER & BUILDER INTEGRATION ---------- */
.page-builder-content {
    width: 100%;
    min-height: 40vh;
}

