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

:root {
    --bg: #000000;
    --text: #e5e5e5;
    --accent: #ff3333;
    --border: #ffffff;
    --main-titles: #444444;
    --placeholder: #888888;
}

html {
    overflow-x: hidden;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: "Lora", sans-serif;
    font-weight: 400;
    font-size: clamp(15px, 1.1vw, 18px);
    line-height: clamp(22px, 1.6vw, 28px);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
    position: relative;
}

h2 {
    font-family: "Cormorant Infant", sans-serif;
    font-weight: 500;
    font-size: 90px;
    text-align: center;
    line-height: 120%;
    letter-spacing: 3px;
    margin-bottom: 32px;
    color: var(--main-titles);
}

p {
    margin-bottom: 24px;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* === HEADER === */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    transition: all 0.4s ease;
    will-change: transform, background, backdrop-filter;
}

#header.header-hidden {
    transform: translateY(-100%);
}

#header.menu-open {
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(20px);
}

#header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}

.logo img {
    height: calc(28px + 1.5vw);
    max-height: 56px;
    width: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.main-nav a:hover {
    opacity: 1;
}

.main-nav .menu-footer {
    display: none;
}


/* === BURGER MENU === */
.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    z-index: 1001;
    padding: 8px;
}

.burger-menu span {
    width: 28px;
    height: 2px;
    background: var(--text);
    transition: all 0.4s ease;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* === MOBILE NAV === */
.main-nav {
    position: static;
    background: transparent;
    padding: 0;
    max-height: none;
    overflow: visible;
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: none;
}

.main-nav::before {
    display: none;
}

/* === HERO === */
#hero {
    height: clamp(768px, calc(1200px - 30vw), 1120px);
    position: relative;
    background: url('../images/hero.png') no-repeat center center / cover;
    color: var(--text);
    overflow: hidden;
}

.hero-content-wrapper {
    position: absolute;
    top: 40%;
    right: 4%;
    transform: translateY(-50%);
    max-width: 600px;
    padding-right: 4%;
    z-index: 2;
    text-align: right;
}

.hero-content-wrapper h1 {
    font-size: 4rem;
    line-height: 1.0;
    margin-bottom: 24px;
    font-family: "Cormorant Infant";
    font-style: italic;
    font-weight: 700;
}

.subscribe-btn {
    display: inline-block;
    padding: 16px 40px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    font-size: 20px;
    font-weight: 400;
    font-family: 'Martel', Georgia, serif;
    letter-spacing: 10%;
    text-transform: uppercase;
    transition: all 0.3s;
    cursor: pointer;
}

.subscribe-btn:hover {
    background: var(--text);
    color: var(--bg);
}

/* === HOME SECTION === */
.section-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
    font-size: 1.2rem;
    opacity: 0.9;
}

.section-intro strong {
    color: var(--accent);
    font-weight: 500;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.post-card {
    background: rgba(255, 255, 255, 0.03);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: border-color 0.3s;
}

.post-card:hover {
    border-color: var(--accent);
}

.post-category {
    display: inline-block;
    width: fit-content;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 3px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-card a {
    font-family: "Cormorant Infant", serif;
    font-style: italic;
    font-weight: 600;
    color: var(--accent);
    font-size: 20px;
    text-decoration: none;
    text-transform: uppercase;
}

.post-card a p {
    font-family: "Lora", sans-serif;
    font-size: 16px;
    margin-top: 15px;
    color: var(--text);
    line-height: 20px;
    text-transform: none;
    text-decoration: none;
    font-style: normal;
}

.post-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
    font-family: 'Playfair Display', serif;
    font-weight: 400;
}

.post-card h3 a {
    color: var(--text);
    text-decoration: none;
    transition: color 0.2s;
}

.post-card h3 a:hover {
    color: var(--accent);
}

.post-excerpt {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 16px;
    line-height: 1.6;
}

.post-date {
    font-size: 0.9rem;
    opacity: 0.7;
}

.post-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.post-video {
    margin: 24px 0;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.post-video iframe {
    width: 100%;
    height: 200px;
}

/* === SUBSCRIPTION FORM === */
.subscription-form {
    text-align: center;                 
    width: 500px;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;                 
}

.home-sub-form {
    align-self: center;                  
    max-width: 100%;
    margin: 0 auto;                     
}

.subscribe-toggle-btn {
    display: inline-block;
    padding: 14px 36px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
    font-family: 'Martel', Georgia, serif;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 32px;
}

.subscribe-toggle-btn:hover {
    background: var(--text);
    color: var(--bg);
    border-color: transparent;
}

.subscribe-form-wrapper {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    padding: 20px 0;
    width: 100%;
}

.subscribe-form-wrapper.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.subscription-form form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    align-items: center;
}

.subscription-form input[type="email"] {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 1rem;
    box-sizing: border-box;
}

.subscription-form input::placeholder {
    color: var(--placeholder);
}

.subscription-form label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.95rem;
    opacity: 0.9;
}

.subscribe-btn {
    align-self: center;
    padding: 12px 36px;
    background: var(--text);
    color: var(--bg);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s;
}

.subscribe-btn:hover {
    background: var(--accent);
}

/* === NEWS SECTION === */
#news h2 {
    text-align: center;
    margin: 0 auto 40px;
}

.news-category {
    margin-bottom: 60px;
}

.news-category h3 {
    font-family: "Cormorant Infant";
    font-size: 2.2rem;
    font-weight: 500;
    margin-bottom: 32px;
    color: var(--text);
    text-align: center;
    letter-spacing: 0.5px;
}

.news-category:last-of-type {
    margin-bottom: 0;
}

.view-more-btn {
    display: block;
    width: 70%;
    margin: 24px auto 48px;
    padding: 14px 28px;
    background: linear-gradient(135deg, rgba(255, 51, 51, 0.9), rgba(255, 51, 51, 0.6));
    color: var(--bg);
    border: none;
    border-radius: 10px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-more-btn:hover {
    background: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 51, 51, 0.35), 0 0 0 1px rgba(255, 51, 51, 0.8);
}

.view-more-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(255, 51, 51, 0.25);
}

.news-search-filter {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.search-box input,
.category-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: transparent;
    color: var(--text);
    outline: none;
}

.search-results {
    display: none;
    margin-bottom: 60px;
}

.search-results.visible {
    display: block;
    animation: fadeIn 0.4s ease forwards;
}

.search-results h3 {
    font-size: 1.8rem;
    color: var(--text);
    text-align: center;
    margin-bottom: 32px;
}

.search-results .post-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0;
    animation: fadeInCard 0.3s ease forwards;
}

.search-results .post-card:nth-child(1) { animation-delay: 0.05s; }
.search-results .post-card:nth-child(2) { animation-delay: 0.1s; }
.search-results .post-card:nth-child(3) { animation-delay: 0.15s; }
.search-results .post-card:nth-child(4) { animation-delay: 0.2s; }
.search-results .post-card:nth-child(5) { animation-delay: 0.25s; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInCard {
    to { opacity: 1; transform: translateY(0); }
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper input {
    flex: 1;
}

.clear-search-btn {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
    z-index: 2;
}

.clear-search-btn:hover {
    opacity: 1;
}

#news-search-input:not(:placeholder-shown) ~ .clear-search-btn {
    display: block;
}

#news-search-input:placeholder-shown ~ .clear-search-btn {
    display: none;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 32px;
    align-items: stretch;
}

.post-card {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.post-card.fade-in {
    opacity: 0;
    transform: translateY(14px);
    animation: fadeInPost 0.45s ease forwards;
}

@keyframes fadeInPost {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-link {
  display: block;
  text-decoration: none;
  color: inherit;
  width: 100%;
  height: 100%;
}

.post-link:hover {
  text-decoration: none;
}

.post-link h4 {
  text-decoration: none;
}

.post-link:hover {
  cursor: pointer;
}

/* === ABOUT === */
#about {
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    position: relative;
    padding: 100px 0;
}

.about-us-container::before,
.about-us-container::after {
    content: '';
    position: absolute;
    left: 10px;
    right: 10px;
    height: 2px;
    background: linear-gradient(to right, var(--bg), var(--accent), var(--bg));
    z-index: 1;
}

.about-us-container::before {
    top: -20px;
}

.about-us-container::after {
    bottom: -20px;
}

#about p {
    max-width: 700px;
    margin: 0 auto 24px;
    font-size: 1.2rem;
    line-height: 1.8;
    opacity: 0.95;
}

#about p:last-of-type {
    margin-bottom: 0;
}

/* === FOOTER === */
#footer {
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    padding: 80px 0 40px;
    margin-top: 100px;
    color: var(--text);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 50px;
    text-align: left;
}

.footer-about h4 {
    font-size: 1.5rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.footer-about p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.85;
}

.footer-nav h5,
.footer-subscribe h5,
.social h5 {
    font-size: 1.1rem;
    margin-bottom: 16px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    color: var(--text);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-nav a:hover {
    opacity: 1;
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 18px;
    margin-top: 12px;
    justify-content: center;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: var(--text);
    background: transparent;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(255, 60, 60, 0.1);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(255, 60, 60, 0.2);
}

.footer-copyright {
    text-align: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* === ADAPTIVE === */
@media (max-width: 992px) {
    h1 {
        font-size: 100px;
    }

    h2 {
        font-size: 50px;
    }

    .hero-content-wrapper {
        top: 37%;
        text-align: end;
        padding-right: 0;
    }
}

@media (max-width: 768px) {
    .burger-menu {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 60px 0 80px;
        z-index: 1000;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition:
                max-height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                opacity 0.5s ease,
                visibility 0.5s;
        transform: translateY(-20px);
    }

    .main-nav.active {
        max-height: 100vh;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .main-nav::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse at top, rgba(255,51,51,0.05) 0%, transparent 50%);
        pointer-events: none;
        z-index: -1;
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 0 20px;
    }

    .main-nav a {
        font-family: "Cormorant Infant", sans-serif;
        font-weight: 500;
        font-size: clamp(40px, 10vw, 80px);
        color: var(--text);
        opacity: 0.9;
        letter-spacing: 2px;
        transition: all 0.3s ease;
    }

    .main-nav a:hover {
        opacity: 1;
        color: var(--accent);
        transform: translateX(10px);
    }

    .main-nav .menu-footer {
        display: block;
        margin-top: 40px;
    }

    .main-nav .social-links {
        justify-content: center;
        gap: 24px;
        margin-top: 20px;
    }

    .main-nav .social-links a {
        width: 50px;
        height: 50px;
        border: 1px solid rgba(255,255,255,0.3);
    }

    .main-nav .social-links a:hover {
        border-color: var(--accent);
        background: rgba(255,51,51,0.1);
        transform: translateY(-6px) scale(1.1);
    }

    .section {
        padding: 60px 0;
    }

    .posts-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 24px;
        padding: 0 10px;
    }

    .post-card {
        max-width: 100%;
    }

    .view-more-btn {
        width: 90%;
    }

    #about {
        padding: 70px 10px;
    }

    .news-search-filter {
        flex-direction: column;
        gap: 10px;
    }

    .search-box input,
    .category-selector select {
        width: 100%;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .footer-about,
    .footer-nav,
    .footer-subscribe,
    .social {
        align-items: center;
    }

    .footer-nav ul {
        align-items: center;
    }

    .subscribe-btn {
        align-self: center;
    }

    .social-links a {
        width: 60px;
        height: 60px;
    }
}

@media (min-width: 769px) {
    .post-video iframe {
        height: 250px;
    }
}

@media (max-width: 600px) {
    .subscription-form,
    .home-sub-form {
        width: 100%;
        padding: 0 20px;
        box-sizing: border-box;
    }

    .subscription-form input[type="email"] {
        max-width: 100%;
    }

    .subscribe-toggle-btn {
        padding: 12px 28px;
        font-size: 0.95rem;
    }
}