/* Глобальные переменные и стили */
:root {
    --font-main: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --color-text-primary: #2d2d2d;
    --color-text-secondary: #666;
    --color-bg-light: #fff;
    --color-bg-medium: #f5f7fa;
    --color-header-bg: black;
    --color-accent: #1a3c6e;
    --shadow-soft: 0 8px 25px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 12px 35px rgba(0, 0, 0, 0.15);
    --border-radius-main: 1rem;
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --header-height: 6rem;
    --news-card-gap: 1.5rem; /* Define a consistent gap */
}

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

body {
    font-family: var(--font-main);
    background: var(--color-bg-light);
    color: var(--color-text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Шапка сайта */
header {
    background: var(--color-header-bg);
    backdrop-filter: blur(15px);
    color: var(--color-bg-light);
    padding: 0 1rem;
    height: var(--header-height);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 95%;
    margin: 0 auto;
}

.logo img {
    height: 4rem;
    transition: transform 0.3s ease;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.logo img:hover {
    transform: scale(1.08);
}

.main-nav {
    position: relative;
}

/* --- СТИЛИ ДЛЯ АДАПТИВНОЙ НАВИГАЦИИ (НОВОЕ) --- */
.nav-toggle {
    display: none; /* Скрыт по умолчанию на десктопе */
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1100;
    padding: 0.5rem;
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-bg-light);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}
.nav-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-wrapper {
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1rem;
    margin: 0;
}

nav ul li a {
    font-size: 1rem;
    padding: 0.6rem 1rem;
    border-radius: var(--border-radius-main);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-smooth);
}

nav ul li a:hover {
    background: var(--color-bg-light);
    color: var(--color-text-primary);
    transform: translateY(-3px);
}

/* Основное содержимое */
main {
    margin-top: var(--header-height);
}

section {
    padding: 6rem 2rem;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--color-text-primary);
}

/* Блок 1 - Герой */
.hero {
    min-height: 90vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('background/mainphoto.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-bg-light);
    padding: 3rem 1rem;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    animation: fadeInUp 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    margin: 1rem 0;
    font-weight: 800;
}

.hero h2 {
    font-size: clamp(1rem, 3vw, 1.2rem);
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    font-size: 1.1rem;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition-smooth);
    display: inline-block;
}

.hero-cta:hover {
    background: var(--color-bg-light);
    color: var(--color-text-primary);
    transform: scale(1.05);
}

/* Общие стили для анимированных карточек */
.animated-item {
    opacity: 0;
    transform: translateY(40px) scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.animated-item.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Блок 2 - Что такое материаловедение */
.about {
    background: var(--color-bg-light);
}

.about-content {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--color-bg-light);
    padding: 2.5rem;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
}

.about-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--color-text-secondary);
    line-height: 2;
}

/* Блок 3 - Цитата */
.quote {
    background: var(--color-bg-medium);
}

.quote-content {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--color-bg-light);
    padding: 2.5rem;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
}

.quote p {
    font-style: italic;
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    line-height: 1.9;
    margin-bottom: 3rem;
    color: var(--color-text-primary);
}

.quote h1 {
    font-size: clamp(1rem, 2vw, 1.4rem);
    text-align: right;
    font-weight: 600;
    color: var(--color-text-primary);
}

/* Блок 4 - Материаловедение в современной России */
.modern {
    background: var(--color-bg-light);
}

.modern-columns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.column {
    text-align: center;
    background: var(--color-bg-light);
    padding: 2.5rem;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.column:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
    background: var(--color-accent);
    color: var(--color-bg-light);
}

.column:hover h3,
.column:hover p {
    color: var(--color-bg-light);
}

.column h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 1rem;
    color: var(--color-text-primary);
    transition: color 0.3s ease;
}

.column p {
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--color-text-secondary);
    transition: color 0.3s ease;
}

/* Блок 5 - Видео */
.video-section {
    background: var(--color-bg-medium);
}

.video-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Соотношение 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--border-radius-main);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: var(--border-radius-main);
}

/* Блок 6 - Галерея */
.gallery {
    background: var(--color-bg-light);
}

.gallery-content {
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.7s ease-in-out;
}

.gallery-slide.active {
    opacity: 1;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--color-bg-light);
    padding: 3rem 1.5rem 1.5rem;
    text-align: center;
    font-size: 1.1rem;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-slide.active .gallery-caption {
    opacity: 1;
    transform: translateY(0);
}

.carousel-prev,
.carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: var(--color-bg-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 10;
}

.carousel-prev:hover,
.carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-prev {
    left: 1rem;
}

.carousel-next {
    right: 1rem;
}

/* Блок 7 - Партнеры */
.partners {
    background: var(--color-bg-medium);
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.partners-grid img {
    max-width: 100%;
    background: var(--color-bg-light);
    padding: 1.5rem;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    object-fit: cover;
}

.partners-grid img:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-medium);
}

/* Подвал сайта */
footer {
    background: #111;
    color: #eee;
    padding: 5rem 2rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.footer-map {
    width: 100%;
    height: 350px;
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
    background-color: #333; /* Placeholder color */
}

.footer-contacts {
    background: #1c1c1c;
    padding: 2rem;
    border-radius: var(--border-radius-main);
}

.footer-contacts h3 {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    text-align: center;
}

.contacts-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contacts-column h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-bg-light);
}

.contacts-column p {
    margin-bottom: 0.8rem;
    color: #aaa;
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    font-size: 1.8rem;
    color: #aaa;
    transition: var(--transition-smooth);
}

.social-links a:hover {
    color: var(--color-bg-light);
    transform: scale(1.1);
}

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    font-size: 0.9rem;
    color: #888;
    border-top: 1px solid #444;
}

/* News Section */
.news {
    background: var(--color-bg-light);
}

.news-carousel-container {
    max-width: 1400px; /* Increased max-width for larger cards on big screens */
    margin: 0 auto;
    position: relative;
    overflow: hidden; /* Hide overflowing cards */
    padding: 2rem 4rem; /* Adjusted horizontal padding for arrows and indents */
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
    background: var(--color-bg-medium);
    cursor: pointer; /* Indicate clickability for modal */
}

.news-carousel {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: var(--news-card-gap);
    justify-content: center; /* Center items consistently */
    align-items: center; /* Vertically center cards */
    flex-wrap: nowrap; /* Prevent wrapping to maintain carousel behavior */
}

.news-card {
    flex-shrink: 0; /* Prevent cards from shrinking */
    width: calc((100% - var(--news-card-gap)) / 2); /* Default to 2 cards for large screens */
    background: var(--color-bg-light);
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: auto; /* Allow height to adjust based on content */
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.news-card img {
    width: 100%;
    height: 220px; /* Default height for larger screens */
    object-fit: cover;
    border-top-left-radius: var(--border-radius-main);
    border-top-right-radius: var(--border-radius-main);
}

.news-card h3 {
    font-size: 1.3rem;
    margin: 1rem 1rem 0.5rem;
    color: var(--color-accent);
}

.news-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 0 1rem 1rem;
}

.news-short-text {
    padding: 0 1rem 1rem;
    font-size: 1rem;
    color: var(--color-text-primary);
    flex-grow: 1; /* Makes the short text occupy available space */
}

.news-carousel-prev,
.news-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: var(--color-bg-light);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    z-index: 10;
}

.news-carousel-prev:hover,
.news-carousel-next:hover {
    background: rgba(0, 0, 0, 0.7);
}

.news-carousel-prev {
    left: 2rem; /* Adjusted to match new container padding */
}

.news-carousel-next {
    right: 2rem; /* Adjusted to match new container padding */
}

/* News Modal (Popup for all news) */
.news-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    padding: 2rem; /* Consistent padding around the modal content */
}

.news-modal-content {
    background-color: var(--color-bg-medium);
    margin: auto;
    padding: 2rem;
    border-radius: var(--border-radius-main);
    width: 90%;
    max-width: 1400px; /* Allow wider modal content for grid */
    position: relative;
    box-shadow: var(--shadow-medium);
    animation: zoomIn 0.3s ease-out;
}

.news-modal-close {
    color: var(--color-text-primary);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.news-modal-close:hover,
.news-modal-close:focus {
    color: var(--color-accent);
}

.modal-news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Default 2 columns for wider screens */
    gap: 2rem; /* Appropriate gap between cards */
    padding-top: 1rem; /* Space for close button */
}

/* Styling for news cards within the modal */
.modal-news-card {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: var(--color-bg-light);
    border-radius: var(--border-radius-main);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%; /* Ensure full width within grid cell */
}

.modal-news-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

.modal-news-card img {
    width: 100%;
    height: 200px; /* Specific height for modal cards */
    object-fit: cover;
    border-top-left-radius: var(--border-radius-main);
    border-top-right-radius: var(--border-radius-main);
}

.modal-news-card h3 {
    font-size: 1.4rem; /* Slightly larger for modal */
    margin: 1rem 1rem 0.5rem;
    color: var(--color-accent);
}

.modal-news-card p {
    font-size: 1rem; /* Slightly larger for modal */
    color: var(--color-text-secondary);
    margin: 0 1rem 1rem;
}

/* Full News Modal (Popup for individual news) */
.full-news-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 3000; /* Higher than news-modal */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.full-news-modal-content {
    background-color: var(--color-bg-light);
    margin: auto;
    padding: 2rem;
    border-radius: var(--border-radius-main);
    width: 90%;
    max-width: 900px;
    position: relative;
    box-shadow: var(--shadow-medium);
    animation: zoomIn 0.3s ease-out;
    text-align: center;
}

.full-news-modal-close {
    color: var(--color-text-primary);
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.full-news-modal-close:hover,
.full-news-modal-close:focus {
    color: var(--color-accent);
}

.full-news-image {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-main);
    margin-bottom: 1.5rem;
}

.full-news-title {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    color: var(--color-accent);
    margin-bottom: 0.8rem;
}

.full-news-date {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

.full-news-text {
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    line-height: 1.8;
    text-align: left;
    color: var(--color-text-primary);
    max-height: 50vh; /* Limit height and add scroll if needed */
    overflow-y: auto;
    padding-right: 15px; /* Space for scrollbar */
}

/* Scrollbar styling for full-news-text */
.full-news-text::-webkit-scrollbar {
    width: 8px;
}

.full-news-text::-webkit-scrollbar-track {
    background: var(--color-bg-medium);
    border-radius: 10px;
}

.full-news-text::-webkit-scrollbar-thumb {
    background-color: var(--color-accent);
    border-radius: 10px;
    border: 2px solid var(--color-bg-medium);
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(2rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Адаптивность */
@media (max-width: 1023px) {
    .nav-toggle {
        display: block;
    }

    .nav-wrapper {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--color-header-bg);
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        padding: 2rem;
    }

    .nav-wrapper.visible {
        transform: translateX(0);
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    nav ul li a {
        font-size: 1.2rem;
    }
}

/* Responsive adjustments for news section */
@media (max-width: 1200px) {
    .news-carousel-container {
        padding: 2rem 3rem; /* Adjust padding for slightly smaller screens */
    }
    .news-carousel-prev {
        left: 1.5rem; /* Adjust arrow position */
    }
    .news-carousel-next {
        right: 1.5rem; /* Adjust arrow position */
    }
    .news-card img {
        height: 180px; /* Reduce news image height for larger tablets/smaller desktops */
    }
}

@media (min-width: 769px) {
    .modal-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem; /* Adequate gap for larger screens */
    }

    .modal-news-card img {
        height: 220px; /* Larger image height for modal cards */
    }

    .modal-news-card h3 {
        font-size: 1.4rem;
    }

    .modal-news-card p {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 1rem;
    }

    .contacts-columns {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .contacts-column p {
        justify-content: center;
    }

    .social-links {
        justify-content: center;
    }

    .modern-columns {
        grid-template-columns: 1fr;
    }

    .news-carousel-container {
        padding: 2rem 0.5rem; /* Reduced padding for small screens */
    }

    .news-card {
        width: calc(100% - 1rem); /* Full width minus minimal padding for centering */
        margin: 0 auto; /* Center the card */
        max-width: 400px; /* Cap card width for very small screens */
    }

    .news-carousel {
        justify-content: center; /* Ensure single card is centered */
    }

    .news-card img {
        height: 140px; /* Smaller height for mobile */
    }

    .news-card h3 {
        font-size: 1.1rem;
    }

    .news-card p {
        font-size: 0.85rem;
    }

    .news-short-text {
        font-size: 0.95rem;
    }

    .news-carousel-prev,
    .news-carousel-next {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
        left: 0.25rem; /* Arrows closer to edge on small screens */
    }

    .news-carousel-next {
        right: 0.25rem;
    }

    .news-modal-content,
    .full-news-modal-content {
        padding: 1.5rem;
        width: 95%;
    }

    .modal-news-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 1rem; /* Smaller gap on mobile */
    }

    .modal-news-card {
        width: 100%; /* Full width for modal cards */
        max-width: 400px; /* Consistent max-width with news-card */
        margin: 0 auto; /* Center modal cards */
    }

    .modal-news-card img {
        height: 140px; /* Adjust image height for modal cards on mobile */
    }

    .modal-news-card h3 {
        font-size: 1.2rem; /* Adjusted for mobile */
    }

    .modal-news-card p {
        font-size: 0.9rem; /* Adjusted for mobile */
    }

    .full-news-image {
        margin-bottom: 1rem;
    }

    .full-news-title {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    .full-news-date {
        font-size: 0.9rem;
    }

    .full-news-text {
        font-size: clamp(0.9rem, 2.5vw, 1rem);
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: clamp(2rem, 5vw, 3rem);
    }

    .hero-content {
        padding: 1.5rem;
    }

    .section-title h2 {
        font-size: clamp(1.8rem, 4vw, 2.2rem);
    }

    .footer-map {
        height: 250px;
    }

    .news-card {
        width: calc(100% - 0.5rem); /* Tighter padding for very small screens */
        max-width: 320px; /* Further cap for very small screens */
    }

    .news-card img {
        height: 120px; /* Smallest height for very small screens */
    }

    .news-card h3 {
        font-size: 1rem;
    }

    .news-card p {
        font-size: 0.75rem;
    }

    .news-short-text {
        font-size: 0.85rem;
    }

    .modal-news-card {
        width: 100%;
        max-width: 320px; /* Match news-card max-width */
        margin: 0 auto;
    }

    .modal-news-card img {
        height: 120px; /* Smallest height for modal cards */
    }

    .modal-news-card h3 {
        font-size: 1.1rem;
    }

    .modal-news-card p {
        font-size: 0.8rem;
    }
}

@media (min-width: 1024px) {
    .modern-columns {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        background-attachment: fixed;
    }
}