/*
Theme Name: gomel-travel.by
Author: Agent
Description: Гомель Тревел
Version: 1.0.0
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;500;700;800&family=Work+Sans:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    --primary: #00695c;
    --secondary: #ff6f00;
    --accent: #0277bd;
    --bg-main: #e8f5e9;
    --white: #ffffff;
    --text-main: #2d3748;
    --text-muted: #4a5568;
    --glass: rgba(255, 255, 255, 0.7);
    --border: rgba(0, 0, 0, 0.1);
    
    --container-width: 1280px;
    --content-width: 800px;
    --transition: all 0.3s ease;
    --radius: 0px;

    --section-pad: clamp(4rem, 8vw, 8rem);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    overflow-x: hidden;
    position: relative;
    width: 100%;
    max-width: 100%;
    background: var(--bg-main);
    color: var(--text-main);
    font-family: 'Work Sans', sans-serif;
    line-height: 1.6;
}

h1, h2, h3, .logo, .btn-arc {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: break-word;
}

h1 { font-size: clamp(1.8rem, 8vw, 5rem); margin-bottom: 2rem; word-break: break-word; }
h2 { font-size: clamp(1.6rem, 5vw, 3rem); margin-bottom: 3rem; word-break: break-word; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

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

a { text-decoration: none; color: inherit; transition: var(--transition); }

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* Base Post Content */
.post-content h1, .post-content h2, .post-content h3, .post-content h4 {
    color: var(--primary);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}
.post-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}
.post-content ul, .post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}
.post-content li {
    margin-bottom: 0.5rem;
}
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}
.post-content th, .post-content td {
    border: 1px solid var(--border);
    padding: 1rem;
    text-align: left;
}
.post-content th {
    background: var(--primary);
    color: var(--white);
}

/* Sections isolation & bg */
section {
    isolation: isolate;
    position: relative;
}

/* V-D Colored section backgrounds */
.section-colored {
    background-color: var(--primary);
    color: var(--white);
}
.section-colored h2 {
    color: var(--white);
}
.section-colored .text-muted {
    color: rgba(255,255,255,0.8);
}

/* Header fixes */
.site-main > section:first-child {
    padding-top: clamp(80px, 12vw, 120px);
}

/* Axis 1: N-E Minimal top-bar */
.site-header {
    height: 50px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    background: var(--primary);
    color: var(--white);
}
.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: clamp(1rem, 5vw, 4rem);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.2rem, 3vw, 1.5rem);
    color: var(--white) !important;
    text-transform: uppercase;
    min-width: 100px;
    min-height: 1em;
    flex-shrink: 0;
    flex-wrap: wrap !important;
}
.logo span { color: var(--secondary); font-weight: 300; }

.main-nav ul { display: flex; list-style: none; gap: clamp(1.5rem, 3vw, 3.5rem); }
.main-nav a { font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--white); opacity: 0.9; }
.main-nav a:hover { color: var(--secondary); opacity: 1; }

.nav-toggle { display: none; }

/* Axis 2: H-E Compact Hero */
.hero-arc {
    height: 40vh;
    min-height: 350px;
    display: flex;
    align-items: center;
    position: relative;
    background: var(--primary);
    color: var(--white);
    overflow: hidden;
}
.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.btn-arc {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--secondary);
    color: var(--white);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}
.btn-arc:hover { background: var(--white); color: var(--secondary); }

/* Axis 3: F-C Accordion features */
.features-section { padding: var(--section-pad) 0; }
.accordion {
    max-width: 800px;
    margin: 0 auto;
}
.accordion-item {
    border-bottom: 1px solid var(--border);
    margin-bottom: 1rem;
}
.accordion-header {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 1.5rem 0;
    font-size: 1.4rem;
    font-weight: 700;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-muted);
}
.accordion-content p {
    padding-bottom: 1.5rem;
}
.accordion-item.active .accordion-content {
    max-height: 500px;
}

/* Axis 5: U-D Photo Strip (Showcase) */
.showcase-arc { padding: var(--section-pad) 0; overflow: hidden; background: var(--bg-main); }
.strip-container { display: flex; gap: 0; animation: scrollStrip 40s linear infinite; width: fit-content; }
.strip-item { width: 350px; height: 250px; flex-shrink: 0; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; }

@keyframes scrollStrip {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Axis 4: C-E Numbered cards */
.posts-section { padding: var(--section-pad) 0; }
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }

/* Rule 21 & Robust Flexbox */
.post-card-arc { 
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--white);
    position: relative;
    border-left: 4px solid var(--primary);
}
.post-card-arc .card-number {
    position: absolute;
    top: -20px;
    left: -15px;
    font-size: 4rem;
    font-weight: 800;
    font-family: 'Space Grotesk', sans-serif;
    color: var(--secondary);
    opacity: 0.3;
    line-height: 1;
    z-index: 1;
    pointer-events: none;
}
.post-card-arc .thumb { 
    height: clamp(180px, 25vw, 300px); 
    width: 100%;
    display: block;
    position: relative;
    z-index: 2;
}
.post-card-arc .thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}
.post-card-content { 
    padding: 2rem; 
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    z-index: 2;
}
.post-card-content h3 { 
    font-size: 1.3rem; 
    color: var(--text-main); 
    margin-bottom: 1rem; 
    flex-grow: 1;
}
.post-card-content .meta-cat {
    font-size: 0.8rem;
    color: var(--secondary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.post-card-content a.read-more {
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-top: 1rem;
    display: inline-block;
}

/* Rule 8: Golden Standard Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 5rem 0; flex-wrap: wrap; }
.pagination .page-numbers { 
    display: flex; align-items: center; justify-content: center; 
    min-width: 45px; height: 45px; padding: 0 8px;
    text-decoration: none; font-weight: 700; border: 1px solid var(--border);
    transition: 0.3s;
}
.pagination .page-numbers.current { background: var(--primary); color: #fff; border-color: var(--primary); }
.pagination .page-numbers.dots { border: none; background: transparent; cursor: default; }
.pagination .page-numbers:hover:not(.current):not(.dots) { background: var(--secondary); color: var(--primary); }

/* Axis 6: FT-D CTA Footer */
.site-footer { background: var(--primary); color: var(--white); padding: 5rem 0 2rem; }
.cta-footer {
    text-align: center;
    margin-bottom: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.cta-footer h2 { color: var(--white); margin-bottom: 1.5rem; }
.cta-footer .btn-arc { background: var(--secondary); color: var(--white); margin-top: 1.5rem; }

.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4rem; margin-bottom: 3rem; }

.footer-logo { 
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(1.5rem, 5vw, 2.5rem); 
    margin-bottom: 1.5rem; 
    color: var(--white); 
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 800;
    flex-wrap: wrap !important;
    overflow-wrap: anywhere;
}
.footer-logo span { color: var(--secondary); font-weight: 300; }
.footer-desc { color: rgba(255,255,255,0.7); line-height: 1.6; max-width: 100%; overflow-wrap: break-word;}

.footer-nav ul { list-style: none; }
.footer-nav li { margin-bottom: 1rem; }
.footer-nav a { color: rgba(255,255,255,0.8); font-weight: 500; }
.footer-nav a:hover { color: var(--secondary); }

.footer-bottom { border-top: 1px solid rgba(255,255,255,0.05); padding-top: 2rem; text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.5); }

/* Axis 8: D-A Diagonal Cuts */
.diagonal-cut {
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
    padding-bottom: clamp(6rem, 10vw, 10rem);
}
.diagonal-cut-reverse {
    clip-path: polygon(0 10%, 100% 0, 100% 100%, 0 100%);
    padding-top: clamp(6rem, 10vw, 10rem);
}

@media (max-width: 1024px) {
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .site-main { margin-left: 0 !important; width: 100% !important; }
}

@media (max-width: 768px) {
    .site-header { height: 60px; }
    .header-inner { gap: 1rem; }
    .main-nav { display: none; }
    .nav-toggle { 
        display: flex; flex-direction: column; gap: 5px; cursor: pointer; z-index: 10001; 
        background: transparent; border: none; padding: 5px;
    }
    .nav-toggle span { width: 25px; height: 2px; background: var(--white); transition: 0.3s; }
    
    body.menu-open .nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
    body.menu-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    body.menu-open .main-nav { 
        display: flex; position: fixed; inset: 0; background: var(--primary); 
        z-index: 10000; align-items: center; justify-content: center;
        transform: translateY(0);
        visibility: visible;
    }
    body.menu-open .main-nav ul { flex-direction: column; text-align: center; gap: 2.5rem; }
    body.menu-open .main-nav a { font-size: 1.5rem; }

    .features-grid { grid-template-columns: 1fr; }
    .posts-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 3rem; text-align: left; }
    .diagonal-cut { clip-path: polygon(0 0, 100% 0, 100% 95%, 0 100%); }
}

/* GLOBAL FIXES FOR RULE 16, 21, AND Z-INDEX */
.site-main > section:first-child {
    padding-top: clamp(140px, 15vh, 180px) !important;
}
.hero-arc {
    height: auto !important;
    min-height: max(400px, 50vh) !important;
}
section, .hero-arc, .hero-split, .site-main > section {
    isolation: isolate;
}
.hero-content, .hero-text {
    position: relative;
    z-index: 1;
}
.post-card-arc {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}
.post-card-arc .thumb {
    display: block !important;
    height: clamp(180px, 25vw, 300px) !important;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}
.post-card-arc .thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
.post-card-content {
    display: flex !important;
    flex-direction: column !important;
    flex-grow: 1 !important;
}
.post-card-content h3 {
    flex-grow: 1 !important;
}
.btn-read, .read-more-link {
    margin-top: auto !important;
}
.logo, .footer-logo {
    flex-wrap: wrap !important;
}
