/*
Theme Name: dani.kz
Author: Developer
Description: Theme for dani.kz
Version: 1.0.0
*/

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

:root {
    --primary: #1b5e20;
    --secondary: #e91e63;
    --accent: #00bcd4;
    --bg-main: #f9fbe7;
    --white: #ffffff;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --glass: rgba(255, 255, 255, 0.9);
    --border: rgba(27, 94, 32, 0.1);
    
    --container-width: 1280px;
    --content-width: 800px;
    --transition: all 0.3s ease;
    --radius: 20px;

    --section-pad: clamp(5rem, 12vw, 10rem);
}

* { 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: 'Mulish', sans-serif;
    line-height: 1.7;
}

h1, h2, h3, .logo, .btn-arc {
    font-family: 'Poppins', 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: 4rem; text-align: center; word-break: break-word; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

img { max-width: 100%; height: auto; display: block; border-radius: var(--radius); }

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

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

section {
    isolation: isolate;
    position: relative;
    overflow: hidden;
}

.site-main > section:first-child {
    padding-top: 150px;
}

/* Axis 7: V-A Soft shadows */
.soft-shadow {
    background: var(--white);
    border: none;
    box-shadow: 0 15px 35px rgba(27, 94, 32, 0.05), 0 5px 15px rgba(0, 0, 0, 0.02);
}

/* Axis 8: D-D Background SVG patterns */
.svg-pattern-bg {
    position: absolute;
    inset: 0;
    opacity: 0.04;
    z-index: -1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231b5e20' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Axis 1: N-C Hamburger always */
.site-header {
    height: 100px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 9999;
    transition: var(--transition);
}
.site-header.scrolled { height: 80px; background: var(--white); box-shadow: 0 5px 20px rgba(0,0,0,0.05); }

.header-inner {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    gap: clamp(1rem, 5vw, 4rem);
}

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

.main-nav { 
    display: block; 
    position: fixed; 
    top: 0; right: 0; 
    width: 400px; max-width: 100%; height: 100vh;
    background: var(--primary); 
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.4s ease;
    visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.menu-open .main-nav { 
    transform: translateX(0); 
    visibility: visible; 
}
.main-nav ul { display: flex; flex-direction: column; list-style: none; gap: 2rem; text-align: center; }
.main-nav a { font-size: 1.5rem; font-family: 'Poppins', sans-serif; font-weight: 600; text-transform: uppercase; color: var(--white); }
.main-nav a:hover { color: var(--accent); }

.nav-toggle { 
    display: flex; flex-direction: column; gap: 6px; cursor: pointer; z-index: 2100;
    background: transparent; border: none; padding: 10px; flex-shrink: 0;
}
.nav-toggle span { width: 30px; height: 3px; background: var(--primary); transition: 0.3s; border-radius: 3px; }
.site-header.scrolled .nav-toggle span { background: var(--primary); }

body.menu-open .nav-toggle span { background: var(--white); }
body.menu-open .nav-toggle span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { transform: rotate(-45deg) translate(6px, -7px); }

.btn-arc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem 3rem;
    background: var(--secondary);
    color: var(--white);
    border-radius: 50px;
    box-shadow: 0 10px 20px rgba(233, 30, 99, 0.2);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn-arc:hover { transform: translateY(-3px); box-shadow: 0 15px 30px rgba(233, 30, 99, 0.4); background: var(--primary); color: var(--white); }

/* Axis 2: H-D Breakout asymmetric hero */
.hero-arc {
    padding: var(--section-pad) 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
}
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.hero-image-wrapper {
    position: relative;
    width: 120%;
    margin-right: -20%;
    border-radius: var(--radius) 0 0 var(--radius);
    overflow: hidden;
    box-shadow: -20px 20px 60px rgba(0,0,0,0.1);
    height: 600px;
}
.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}
.hero-content {
    padding-right: 2rem;
    z-index: 2;
    position: relative;
}

/* Axis 3: F-D Single text block features */
.features-section { padding: var(--section-pad) 0; background: var(--white); text-align: center; }
.features-text-block {
    max-width: 900px;
    margin: 0 auto;
}
.features-text-block p {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    line-height: 1.8;
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
}
.features-text-block p strong {
    color: var(--primary);
    font-weight: 700;
}

/* 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: 2rem; animation: scrollStrip 40s linear infinite; width: fit-content; }
.strip-item { width: clamp(250px, 30vw, 400px); height: clamp(350px, 40vw, 500px); flex-shrink: 0; border-radius: var(--radius); overflow: hidden; }
.strip-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; border-radius: 0; }
.strip-item:hover img { transform: scale(1.05); }

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

/* Axis 4: C-F Timeline cards */
.posts-section { padding: var(--section-pad) 0; background: var(--white); }
.timeline-wrapper {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}
.timeline-wrapper::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0;
    left: 50px;
    width: 4px;
    background: var(--primary);
    opacity: 0.2;
}
.post-card-arc {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    margin-bottom: 4rem;
    position: relative;
    padding-left: 100px;
}
.timeline-dot {
    position: absolute;
    left: 41px;
    top: 50px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--secondary);
    border: 4px solid var(--white);
    z-index: 2;
}
.post-card-inner {
    display: flex;
    flex-direction: row;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
}
.post-card-inner:hover { transform: translateX(10px); }
.post-card-arc .thumb { 
    width: 300px; 
    flex-shrink: 0;
    height: clamp(180px, 25vw, 300px); 
    position: relative; 
}
.post-card-arc .thumb img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.post-card-content { 
    padding: 2.5rem; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column;
    justify-content: center;
}
.post-card-content h3 { font-size: 1.6rem; color: var(--text-main); margin-bottom: 1rem; }
.post-card-content p { color: var(--text-muted); font-size: 1rem; margin-bottom: 1.5rem; flex-grow: 1; }
.meta-category { font-size: 0.85rem; font-weight: 700; color: var(--accent); text-transform: uppercase; margin-bottom: 0.5rem; }

/* 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;
    border-radius: 8px;
    color: var(--text-main);
}
.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(--white); border-color: var(--secondary); }

/* Axis 6: FT-A Minimalist footer */
.site-footer { background: var(--primary); color: var(--white); padding: 4rem 0; text-align: center; }
.footer-logo { 
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: clamp(1.2rem, 7vw, 2.5rem); 
    margin-bottom: 1.5rem; 
    color: var(--white) !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    flex-wrap: wrap !important;
    overflow-wrap: anywhere;
}
.footer-logo span { color: var(--accent); font-weight: 300; }
.footer-copy {
    color: rgba(255,255,255,0.6);
    font-size: 0.95rem;
}

@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-image-wrapper { width: 100%; margin-right: 0; border-radius: var(--radius); height: 400px; order: -1; }
    .hero-content { padding-right: 0; text-align: center; }
    
    .timeline-wrapper::before { left: 30px; }
    .timeline-dot { left: 21px; }
    .post-card-arc { padding-left: 70px; }
    .post-card-inner { flex-direction: column; }
    .post-card-arc .thumb { width: 100%; }
}

@media (max-width: 768px) {
    .site-header { height: 80px; }
    .header-inner { padding: 1rem 2rem; }
    .nav-toggle { z-index: 2100; }
    
    body.menu-open .main-nav { 
        width: 100%;
        background: var(--primary);
    }
    body.menu-open .main-nav ul { gap: 2.5rem; }
    body.menu-open .main-nav a { font-size: 1.8rem; }
    
    .timeline-wrapper::before { display: none; }
    .timeline-dot { display: none; }
    .post-card-arc { padding-left: 0; margin-bottom: 3rem; }
    
    .site-footer { padding: 3rem 0; }
}

.logo, .footer-logo { flex-wrap: wrap !important; }

/* 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;
}

/* Recommended Articles Strip Cards */
.strip-card { position: relative; overflow: hidden; cursor: pointer; }
.strip-card-link { display: block; width: 100%; height: 100%; text-decoration: none; }
.strip-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; border-radius: 0; }
.strip-card:hover img { transform: scale(1.07); }
.strip-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem 1.5rem;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.strip-card:hover .strip-card-overlay { opacity: 1; }
.strip-card-cat {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}
.strip-card-title {
    font-size: clamp(0.9rem, 1.5vw, 1.1rem);
    color: #ffffff;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex-grow: 1;
}
.strip-card-read {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
