/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
    height: 100%;
    overflow: hidden;
    position: relative;
}

/* Scrollable container */
.scroll-container {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

html {
    overflow: hidden;
    height: 100%;
}

/* Header and navigation */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo section */
.nav-brand {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #333;
    transition: transform 0.2s ease;
}
/* 
.logo-link:hover {
    transform: scale(1.05);
} */

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    letter-spacing: -0.5px;
}

/* Navigation menu */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
    display: block;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #3498db;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hamburger menu button */
.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 5px;
    z-index: 1001;
    transition: transform 0.3s ease;
}

.hamburger:hover {
    transform: scale(1.1);
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translateY(11.9px);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-11.9px);
}

/* Main content */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 0;
    max-width: 100%;
    margin: 0;
}

.btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: #ffffff;
    color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background-color: #f8f9fa;
}

.btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-secondary:hover {
    background-color: #ffffff;
    color: #2c3e50;
    transform: translateY(-3px);
}

.btn-product-contact {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    font-size: 1rem;
    padding: 0.875rem 2rem;
    transform: translateZ(0);
    will-change: transform, opacity;
}

.btn-product-contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-product-contact:hover::before {
    left: 100%;
}

.btn-product-contact:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.margined-list {
    list-style: disc;
    margin-left: 20px;
}

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

/* Carousel section */
.carousel-section {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    background-color: #2c3e50;
}

/* Fullscreen carousel */
.fullscreen-carousel {
    height: 100vh;
    min-height: 600px;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.carousel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.carousel-content {
    text-align: center;
    color: #ffffff;
    padding: 2rem;
    max-width: 900px;
    animation: fadeInUp 0.8s ease;
}

/* Hero content overlay (within carousel) */
.hero-content-overlay {
    width: 100%;
}

.hero-title {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.7);
    color: #ffffff;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.2s both;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    color: #ffffff;
}

.hero-description {
    font-size: 1.3rem;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease 0.4s both;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.6);
    color: #f8f9fa;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease 0.6s both;
    margin-top: 2rem;
}

/* Carousel controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 3rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 2rem;
}

.carousel-next {
    right: 2rem;
}

.carousel-btn span {
    line-height: 1;
    font-weight: 300;
}

/* Carousel indicators */
.carousel-indicators {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 10;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.indicator.active {
    background-color: #ffffff;
    transform: scale(1.2);
}

.indicator:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Features section */
.features-section {
    padding: 5rem 2rem;
    background-color: #ffffff;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background-color: #f8f9fa;
    border-radius: 15px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.feature-card:hover {
    /* transform: translateY(-10px); */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #3498db;
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.feature-description {
    color: #7f8c8d;
    line-height: 1.6;
    font-size: 1rem;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: #ecf0f1;
    margin-top: 0;
    padding-top: 3rem;
    position: relative;
    z-index: 20;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    padding-bottom: 2rem;
}

.footer-section {
    display: flex;
    flex-direction: column;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.footer-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.footer-description {
    color: #bdc3c7;
    line-height: 1.6;
    margin: 0;
    font-size: 0.95rem;
}

.footer-heading {
    font-size: 1.1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 1rem;
    color: #bdc3c7;
}

.contact-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    margin-top: 2px;
    user-select: none;
}

.contact-link {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-all;
}

.contact-link:hover {
    color: #3498db;
}

.contact-text {
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-link {
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    padding-left: 0;
}

.footer-link::before {
    content: '→';
    margin-right: 8px;
    opacity: 0;
    transition: all 0.3s ease;
    position: absolute;
    left: -20px;
}

.footer-link:hover {
    color: #3498db;
    padding-left: 20px;
}

.footer-link:hover::before {
    opacity: 1;
    left: 0;
}

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

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
}

.social-link:hover {
    background-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.social-icon {
    font-size: 1.1rem;
}

.footer-bottom {
    background-color: rgba(0, 0, 0, 0.2);
    text-align: center;
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: #95a5a6;
}

.contact-button-type1-container {
    display: block;
    align-items: center;
    padding: 10px;
    margin-bottom: 50px;
    background-color: rgba(0, 0, 0, 0);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-button-type1-container.visible {
    opacity: 1;
    transform: translateY(0);
    animation: fadeInUp 0.8s ease both;
}

.contact-button-type1-container-subtitle {
    font-size: 2rem;
    font-weight: 600;
    color: #3498db;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 2rem;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: 0s;
    padding: 20px;
}

.contact-button-type1 {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #3498db;
    color: white;
    font-size: 2rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
    margin: 30px auto;
    position: relative;
    overflow: hidden;
}

.contact-button-type1:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 25px rgba(52, 152, 219, 0.4);
    background-color: #2980b9;
}

.contact-button-type1::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.contact-button-type1:hover::after {
    width: 100%;
    height: 100%;
}

/* Responsive support */
@media screen and (max-width: 900px) {
    .contact-button-type1 {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

@media screen and (max-width: 600px) {
    .contact-button-type1 {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Responsive design */
@media screen and (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 60px;
        flex-direction: column;
        background-color: #ffffff;
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
        padding: 0.5rem 0;
    }

    .nav-link {
        padding: 1rem;
        width: 100%;
        display: block;
    }

    .nav-link::after {
        display: none;
    }

    .nav-link:hover {
        background-color: #f8f9fa;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .logo-img {
        height: 35px;
    }

    .main-content {
        padding: 0;
    }

    .fullscreen-carousel {
        height: 100vh;
        min-height: 500px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .carousel-btn {
        width: 50px;
        height: 50px;
        font-size: 2.5rem;
    }

    .carousel-prev {
        left: 1rem;
    }

    .carousel-next {
        right: 1rem;
    }

    .features-section {
        padding: 3rem 1.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .footer {
        padding-top: 2rem;
    }
}

@media screen and (max-width: 480px) {
    .navbar {
        padding: 0.75rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .logo-img {
        height: 30px;
    }

    .footer-container {
        padding: 0 1rem;
    }

    .footer-bottom {
        padding: 1rem;
    }

    .fullscreen-carousel {
        height: 100vh;
        min-height: 400px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .carousel-content {
        padding: 1.5rem;
    }
}

/* Header effect on scroll */
.header.scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

/* ========== About Page ========== */
.main-content:has(.about-page) {
    padding: 0;
    max-width: 100%;
}

.about-page {
    width: 100%;
}

/* Fullscreen hero */
.full-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 480px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 50px;
}

.full-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.about-hero-bg {
    background-image: url('../melephant_app/images/backgrounds/about-hero-image.jpeg');
}

.achievements-hero-bg {
    background-image: url('../melephant_app/images/backgrounds/achievements-hero-image.png');
}

.full-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));
}

.full-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding: 2rem;
    max-width: 800px;
}

.full-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease both;
}

.full-hero-subtitle {
    font-size: 1.75rem;
    font-weight: 300;
    margin-bottom: 1.25rem;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease 0.15s both;
}

.full-hero-description {
    font-size: 1.2rem;
    line-height: 1.75;
    color: #f0f0f0;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease 0.3s both;
}

.about-section {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.about-section-subtitle {
    font-size: 2rem;
    font-weight: 600;
    color: #3498db;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    transition-delay: 0s;
}

.about-section.visible .about-section-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.about-section-blocks {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.about-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    transition-delay: 0.3s;
}

.about-block:nth-child(1) { transition-delay: 0.3s; }
.about-block:nth-child(2) { transition-delay: 0.45s; }
.about-block:nth-child(3) { transition-delay: 0.6s; }
.about-block:nth-child(4) { transition-delay: 0.75s; }
.about-block:nth-child(5) { transition-delay: 0.9s; }

.about-section.visible .about-block {
    opacity: 1;
    transform: translateY(0);
}

.about-block--reverse .about-block-media { order: 2; }
.about-block--reverse .about-block-body { order: 1; }

.about-block-media {
    width: 100%;
    background-color: rgba(0, 0, 0, 0);
    border-radius: 12px;
    overflow: hidden;
}

.about-block-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.about-block-body {
    padding: 0 0.5rem;
}

.about-block-title {
    font-size: 1.85rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.about-block-text {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #555;
}

/* About responsive */
@media screen and (max-width: 900px) {
    .about-section {
        padding: 0 1.5rem 3rem;
    }

    .about-section-blocks {
        gap: 3rem;
    }

    .about-block {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-block-media,
    .about-block--reverse .about-block-media {
        order: 1;
    }

    .about-block-body,
    .about-block--reverse .about-block-body {
        order: 2;
    }

    .about-block-media {
        max-width: 100%;
    }
}

@media screen and (max-width: 600px) {
    .full-hero-title {
        font-size: 2.5rem;
    }

    .full-hero-subtitle {
        font-size: 1.4rem;
    }

    .full-hero-description {
        font-size: 1rem;
    }

    .about-section {
        padding: 0 1rem 2.5rem;
    }

    .about-section-blocks {
        gap: 2.5rem;
    }

    .about-block-title {
        font-size: 1.5rem;
    }

    .about-block-text {
        font-size: 1rem;
    }

    .about-section-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
}

/* ========== R&D Page (Simple: Title, Image, Description) ========== */
.rd-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.rd-page.visible {
    opacity: 1;
    transform: translateY(0);
}

.rd-page:nth-child(1) { transition-delay: 0.1s; }
.rd-page:nth-child(2) { transition-delay: 0.2s; }
.rd-page:nth-child(3) { transition-delay: 0.3s; }
.rd-page:nth-child(4) { transition-delay: 0.4s; }
.rd-page:nth-child(5) { transition-delay: 0.5s; }
.rd-page:nth-child(6) { transition-delay: 0.6s; }

.rd-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.rd-image {
    width: 100%;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.rd-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.rd-description {
    font-size: 1.1rem;
    line-height: 1.75;
    color: #555;
}

.rd-description p {
    margin: 0 0 1rem;
}

.rd-description p:last-child {
    margin-bottom: 0;
}

.rd-list {
    margin-left: 15px;
}

@media screen and (max-width: 600px) {
    .rd-page {
        padding: 2rem 1rem;
    }

    .rd-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .rd-image {
        margin-bottom: 1.5rem;
    }

    .rd-description {
        font-size: 1rem;
    }
}

/* ========== Product Page Animations ========== */

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    font-size: 14px;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* Unified animation classes for consistency */
.product-hero-content .hero-transition {
    transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

/* Unified fade animation for all elements */
.product-hero-content .fade-out,
.product-hero-content .fade-out-text {
    background: rgba(255, 255, 255, 0) !important;
    border-color: transparent !important;
    opacity: 0 !important;
    transform: translateY(6px) !important;
    transition: all 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.3s ease !important;
}

/* Base transition for all animated elements */
.product-hero-content .product-hero-title,
.product-hero-content .product-hero-subtitle,
.product-hero-content .product-hero-description,
.product-hero-content .hero-bg-img {
    transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

/* Background elements with backdrop-filter */
.product-hero-content .dye-samples,
.product-hero-content .btn-product-contact {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.product-hero-content .btn-product-contact {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ========== Product Page ========== */
.product-page {
    width: 100%;
    min-height: 100vh;
}

/* Product Hero Section */
.product-hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
}

.product-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
}

.product-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.4));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.product-hero-content {
    text-align: center;
    color: #ffffff;
    padding: 2rem;
    max-width: 900px;
    animation: fadeInUp 1s ease;
    position: relative;
    z-index: 3;
    margin-top: 0;
    margin-left: 55px;
    margin-right: 55px;
    transform: none;
}

.dye-samples {
    display: flex;
    gap: 12px;
    padding: 10px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 3;
    width: fit-content;
    margin: 18px auto 0;
    transform: translateZ(0);
    will-change: transform, opacity;
}

.dye-sample {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    overflow: hidden;
    cursor: default;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25);
    transform: translateZ(0);
}

.dye-sample-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.dye-sample--active {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.25), 0 0 0 2px rgba(255, 255, 255, 0.35);
}

@media screen and (max-width: 768px) {
    .dye-samples {
        /* width: 100%; */
        margin: 16px auto 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }
}

/* Simplified text transitions matching background elements */
.product-hero-content .product-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 3px 3px 15px rgba(0, 0, 0, 0.8);
    line-height: 1.2;
    position: relative;
}

.product-hero-content .product-hero-title.fade-out-text {
    text-shadow: 3px 3px 25px rgba(0, 0, 0, 0.9) !important;
}

.product-hero-content .product-hero-subtitle {
    font-size: 1.8rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
    color: #f8f9fa;
    position: relative;
}

.product-hero-content .product-hero-subtitle.fade-out-text {
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.8) !important;
}

.product-hero-content .product-hero-description {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.7);
    color: #e9ecef;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.product-hero-content .product-hero-description.fade-out-text {
    text-shadow: 1px 1px 15px rgba(0, 0, 0, 0.8) !important;
}

.product-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.product-hero-actions .btn {
    padding: 0.75rem 2rem;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-block;
}

/* Color Palette Section */
.color-palette-section {
    width: 100%;
    padding: 1.5rem 2rem;
    background: transparent;
    z-index: 10;
}

.color-palette-section--sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
}

.color-palette-section--hero {
    position: absolute;
    top: 90px;
    left: 0;
    right: auto;
    bottom: auto;
    transform: translate(-85%, -75px);
    z-index: 4;
}

.palette-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.color-palette {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.color-palette-section--hero .color-palette {
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.9rem;
    flex-wrap: nowrap;
}

.palette-item {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    width: 50px;
    height: 50px;
    backdrop-filter: blur(10px);
}

.palette-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.palette-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.palette-item:hover::before {
    opacity: 1;
}

.palette-item.active {
    border-color: #3498db;
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(52, 152, 219, 0.3);
}

.color-palette-section--hero .palette-item.active {
    transform: translate3d(10px, 0, 0) !important;
}

.color-palette-section--hero .palette-item:hover {
    transform: translate3d(10px, 0, 0) !important;
}

.color-palette-section--hero .palette-item::before {
    content: none;
    opacity: 0 !important;
}

.color-palette-section--hero .palette-color::after {
    content: none;
}

.palette-color {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.color-palette-section--hero .palette-item {
    width: 200px;
    height: 44px;
    border-radius: 2px;
    padding: 0.3rem;
}

.color-palette-section--hero .palette-color {
    width: 100%;
    height: 100%;
    border-radius: 2px;
}

.color-palette-section--hero .palette-color::before {
    content: attr(data-emoji);
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    font-size: 14px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
    pointer-events: none;
}

.palette-color::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.palette-item:hover .palette-color::after {
    width: 100%;
    height: 100%;
}

.palette-item.active .palette-color {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

/* Product Details Section */
.product-details-section {
    position: relative;
    z-index: 5;
    margin-top: 0;
    padding: 4rem 2rem 8rem;
    background: transparent;
    min-height: 100vh;
}

.product-details-container {
    max-width: 1200px;
    margin: 0 auto;
}

.product-info {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
    background-color: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.product-info.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-name {
    font-size: 2.2rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.product-name::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

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

.feature-item {
    background-color: rgba(248, 249, 250, 0.9);
    padding: 2rem;
    border-radius: 15px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-left-color: #2ecc71;
}

.feature-item h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-item h4::before {
    content: '▶';
    color: #3498db;
    font-size: 0.8rem;
}

.feature-item ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-item li {
    padding: 0.5rem 0;
    color: #555;
    position: relative;
    padding-left: 1.5rem;
    transition: color 0.3s ease;
}

.feature-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2ecc71;
    font-weight: bold;
}

.feature-item li:hover {
    color: #3498db;
}

.product-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    background: rgba(248, 249, 250, 0.9);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(5px);
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.spec-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.spec-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.95rem;
}

.spec-value {
    font-weight: 500;
    color: #3498db;
    font-size: 1rem;
}

#productPrice {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e74c3c;
}

/* Performance optimizations */
.product-hero-content .product-hero-title,
.product-hero-content .product-hero-subtitle,
.product-hero-content .product-hero-description,
.product-hero-content .hero-bg-img,
.product-hero-content .dye-samples,
.product-hero-content .btn-product-contact,
.dye-sample-img {
    will-change: transform, opacity; /* GPU acceleration hint */
    backface-visibility: hidden; /* Prevent flickering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Enhanced responsive design with better breakpoints */
@media screen and (max-width: 1200px) {
    .product-hero-content {
        margin-left: 40px;
        margin-right: 40px;
    }
}

@media screen and (max-width: 900px) {
    .product-hero-content {
        margin-left: 30px;
        margin-right: 30px;
    }
    
    .color-palette-section--hero {
        transform: translate(-87.5%, -75px);
    }
}

@media screen and (max-width: 768px) {
    .product-hero-content {
        padding: 1.25rem 1rem;
        margin-left: 20px;
        margin-right: 20px;
    }
    
    .product-hero-content .product-hero-title,
    .product-hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .product-hero-content .product-hero-subtitle,
    .product-hero-subtitle {
        font-size: 1.15rem;
        margin-bottom: 1rem;
    }
    
    .product-hero-content .product-hero-description,
    .product-hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
    }
    
    .product-hero-actions {
        margin-bottom: 1.25rem;
    }
    
    .product-hero-actions .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
        width: auto;
    }
    
    .color-palette-section {
        padding: 1rem;
    }
    
    .palette-item {
        width: 45px;
        height: 45px;
        padding: 0.4rem;
    }
    
    .palette-color {
        width: 25px;
        height: 25px;
    }
    
    .color-palette {
        gap: 0.6rem;
    }
    
    .product-name {
        font-size: 1.8rem;
    }
    
    .product-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-specs {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .product-details-section {
        padding: 3rem 1rem 8rem;
    }

    .dye-sample {
        width: 40px;
        height: 40px;
        border-radius: 5px;
    }
    
    /* Touch device optimizations */
    @media (hover: none) and (pointer: coarse) {
        .palette-item:hover {
            transform: none;
        }
        
        .palette-item:active {
            transform: scale(0.95);
        }
    }
}

@media screen and (max-width: 480px) {
    .product-hero {
        min-height: 100vh;
    }
    
    .product-hero-overlay {
        align-items: center;
        justify-content: center;
    }
    
    .product-hero-content {
        padding: 0.75rem 1rem;
        margin-left: 12px;
        margin-right: 12px;
        margin-top: 0;
    }
    
    .product-hero-content .product-hero-title,
    .product-hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.75rem;
    }
    
    .product-hero-content .product-hero-subtitle,
    .product-hero-subtitle {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }
    
    .product-hero-content .product-hero-description,
    .product-hero-description {
        font-size: 0.875rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }
    
    .product-hero-actions {
        margin-bottom: 1rem;
    }
    
    .product-hero-actions .btn {
        padding: 0.5rem 1.25rem;
        font-size: 0.85rem;
    }
    
    .color-palette-section {
        padding: 0.8rem;
    }
    
    .product-details-section {
        padding: 2rem 1rem 8rem;
    }
    
    .palette-item {
        width: 40px;
        height: 40px;
        padding: 0.3rem;
    }
    
    .palette-color {
        width: 20px;
        height: 20px;
    }
    
    .color-palette {
        gap: 0.5rem;
    }
    
    .feature-item {
        padding: 1.5rem;
    }
}

/* Extra small phones - ensure overlay text fits on screen */
@media screen and (max-width: 360px) {
    .product-hero-content {
        padding: 0.5rem 0.75rem;
        margin-left: 8px;
        margin-right: 8px;
    }
    
    .product-hero-content .product-hero-title,
    .product-hero-title {
        font-size: 1.35rem;
        margin-bottom: 0.6rem;
    }
    
    .product-hero-content .product-hero-subtitle,
    .product-hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
    
    .product-hero-content .product-hero-description,
    .product-hero-description {
        font-size: 0.8125rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }
    
    .product-hero-actions .btn {
        padding: 0.45rem 1rem;
        font-size: 0.8rem;
    }
    
    .dye-samples {
        padding: 8px;
        margin-top: 12px;
    }
    
    .dye-sample {
        width: 55px;
        height: 55px;
    }
}

/* High DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-bg-img,
    .dye-sample-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .product-hero-content .product-hero-title,
    .product-hero-content .product-hero-subtitle,
    .product-hero-content .product-hero-description,
    .product-hero-content .hero-bg-img,
    .product-hero-content .dye-samples,
    .product-hero-content .btn-product-contact {
        transition: none !important;
        animation: none !important;
    }
    
    .fade-out,
    .fade-out-text {
        transition: none !important;
    }
}

/* Dark mode support preparation */
@media (prefers-color-scheme: dark) {
    .skip-link {
        background: #fff;
        color: #000;
    }
}

/* ========== Achievements Page ========== */
.achievements-page {
    width: 100%;
}

.achievements-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

/* Content section */
.achievements-content {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.achievements-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.achievements-content-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: #3498db;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

/* .achievements-content-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: #3498db;
    border-radius: 2px;
} */

.achievements-content-subtitle {
    font-size: 1.4rem;
    font-weight: 500;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 2rem;
}

/* Medal list */
.achievements-medals-list {
    display: flex;
    justify-content: center;
}

.achievements-medals-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.achievements-medals-list li {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #3498db;
    border-radius: 10px;
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
    color: #2c3e50;
    font-weight: 500;
    text-align: center;
    max-width: 320px;
    position: relative;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.15);
    transition: all 0.3s ease;
}

.achievements-medals-list li::before {
    content: '⭐️';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    background: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.achievements-medals-list li:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.25);
    border-color: #2ecc71;
}

/* Description with image */
.achievements-withimage-description {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.achievements-withimage-description-image {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.achievements-withimage-description-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.achievements-withimage-description-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.achievements-withimage-description-description ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.achievements-withimage-description-description li {
    margin-bottom: 0.5rem;
    position: relative;
}

.achievements-withimage-description-description li::marker {
    color: #3498db;
}

/* Timeline */
.achievements-timeline {
    position: relative;
    padding-left: 2rem;
}

.achievements-timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #3498db, #2ecc71);
    border-radius: 2px;
}

.achievements-timeline-item {
    position: relative;
    padding: 1.5rem 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.achievements-timeline-item:last-child {
    border-bottom: none;
}

.achievements-timeline-item::before {
    content: '';
    position: absolute;
    left: -2.25rem;
    top: 2rem;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 4px solid #3498db;
    border-radius: 50%;
    transform: translateX(-6px);
    transition: all 0.3s ease;
}

.achievements-timeline-item:hover::before {
    background: #3498db;
    box-shadow: 0 0 0 6px rgba(52, 152, 219, 0.2);
}

.achievements-timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.achievements-timeline-content {
    color: #666;
    font-size: 1rem;
    line-height: 1.6;
}

.achievements-timeline-content h4 {
    font-weight: 400;
    margin: 0;
}

/* Rich list */
.achievements-rich-list {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.achievements-rich-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.achievements-rich-list li {
    background: #fff;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.achievements-rich-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.achievements-rich-list li:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.15);
    border-left-color: #2ecc71;
}

.achievements-rich-list li:hover::before {
    opacity: 1;
}

/* Impact data */
.achievements-impact-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
    border-radius: 20px;
    padding: 2.5rem 3rem;
    margin: 0.75rem;
    min-width: 200px;
    box-shadow: 0 10px 40px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
}

.achievements-impact-data:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 50px rgba(52, 152, 219, 0.4);
}

.achievements-impact-text {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
}

.achievements-impact-subtext {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    margin: 0.75rem 0 0;
    max-width: 180px;
    line-height: 1.4;
}

/* Contact Us button */
.achievements-contact-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3498db 0%, #2ecc71 100%);
    color: #fff;
    font-size: 2rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    margin: 30px auto;
    position: relative;
    overflow: hidden;
}

.achievements-contact-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.achievements-contact-button:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 35px rgba(52, 152, 219, 0.5);
}

.achievements-contact-button:hover::before {
    width: 120%;
    height: 120%;
}

/* Achievements responsive */
@media screen and (max-width: 900px) {
    .achievements-container {
        padding: 0 1.5rem 3rem;
    }

    .achievements-content-title {
        font-size: 1.85rem;
    }

    .achievements-medals-list ul {
        gap: 1rem;
    }

    .achievements-medals-list li {
        padding: 0.85rem 1.25rem 0.85rem 2rem;
        font-size: 0.9rem;
        max-width: 280px;
    }

    .achievements-medals-list li::before {
        left: -8px;
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
    }

    .achievements-withimage-description {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .achievements-impact-data {
        padding: 2rem 2.5rem;
        min-width: 160px;
    }

    .achievements-impact-text {
        font-size: 2.75rem;
    }
}

@media screen and (max-width: 600px) {
    .achievements-container {
        padding: 0 1rem 2rem;
    }

    .achievements-content {
        margin-bottom: 3rem;
    }

    .achievements-content-title {
        font-size: 1.5rem;
    }

    .achievements-content-subtitle {
        font-size: 1.2rem;
    }

    .achievements-medals-list ul {
        flex-direction: column;
        align-items: center;
    }

    .achievements-medals-list li {
        width: 100%;
        max-width: none;
        padding: 1rem 1rem 1rem 2.5rem;
    }

    .achievements-timeline {
        padding-left: 1.5rem;
    }

    .achievements-timeline-item {
        padding: 1rem 0 1rem 1.5rem;
    }

    .achievements-timeline-item::before {
        left: -1.5rem;
        width: 12px;
        height: 12px;
        border-width: 3px;
    }

    .achievements-timeline-title {
        font-size: 1.1rem;
    }

    .achievements-rich-list ul {
        flex-direction: column;
    }

    .achievements-impact-data {
        display: flex;
        width: calc(100% - 1.5rem);
        margin: 0.5rem 0;
        padding: 1.5rem 2rem;
    }

    .achievements-impact-text {
        font-size: 2.25rem;
    }

    .achievements-impact-subtext {
        font-size: 0.9rem;
    }

    .achievements-contact-button {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
}

/* Contact Page */
.contact-page {
    padding: 2.5rem 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.contact-container {
    display: flex;
    gap: 1.5rem;
    align-items: stretch;
    justify-content: center;
    flex-direction: column;
}

.contact-block {
    position: relative;
    width: 100%;
    flex: 0 0 auto;
    min-height: 340px;
    border-radius: 22px;
    overflow: hidden;
    background: #0f172a;
    box-shadow: 0 18px 55px rgba(15, 23, 42, 0.15);
    transform: translateY(18px);
    opacity: 0;
    transition: transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.7s ease, box-shadow 0.35s ease;
    will-change: transform, opacity;
}

.contact-block.is-visible {
    opacity: 1;
    transform: translateY(0);
    transition-delay: var(--reveal-delay, 0ms);
}

.contact-block-background {
    position: absolute;
    inset: 0;
}

.contact-block-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.05);
    transition: transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.35s ease;
}

.contact-block-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 500px at 20% 10%, rgba(255, 255, 255, 0.15), transparent 60%),
        linear-gradient(135deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.15) 50%, rgba(15, 23, 42, 0.55) 100%);
    pointer-events: none;
}

.contact-block-content {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 0.9rem;
    padding: 2.25rem 2rem;
    color: rgba(255, 255, 255, 0.92);
}

.contact-block-title {
    font-size: 1.6rem;
    line-height: 1.2;
    font-weight: 750;
    letter-spacing: -0.02em;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.contact-block-description {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 42ch;
}

.contact-block-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    padding: 0.85rem 1.1rem;
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 650;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.contact-block-email:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
}

.contact-block:hover {
    /* transform: translateY(-6px); */
    transform: scale(1.02);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.22);
}

.contact-block:hover .contact-block-background img {
    transform: scale(1.1);
    filter: saturate(1.1) contrast(1.1);
}

@media screen and (max-width: 900px) {
    .contact-page {
        padding: 2rem 1.25rem 3rem;
    }

    .contact-container {
        gap: 1.25rem;
    }

    .contact-block {
        min-height: 320px;
        border-radius: 18px;
    }

    .contact-block-content {
        padding: 2rem 1.5rem;
    }
}

@media screen and (max-width: 600px) {
    .contact-container {
        flex-direction: column;
    }

    .contact-block {
        min-height: 300px;
    }

    .contact-block-title {
        font-size: 1.4rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-block,
    .contact-block-background img,
    .contact-block-email {
        transition: none;
    }

    .contact-block {
        transform: none;
        opacity: 1;
    }
}

/* privacy page */

.privacy-page {
    width: 100%;
}

.privacy-container {
    text-align: start;
    padding: 100px 10% 100px 10%;
}

/* Error Page - Modern Design */
.error-page {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.error-page-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.error-particles {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.error-particles:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.error-particles:nth-child(2) {
    width: 60px;
    height: 60px;
    top: 60%;
    left: 80%;
    animation-delay: 1s;
}

.error-particles:nth-child(3) {
    width: 100px;
    height: 100px;
    top: 80%;
    left: 20%;
    animation-delay: 2s;
}

.error-particles:nth-child(4) {
    width: 40px;
    height: 40px;
    top: 30%;
    left: 70%;
    animation-delay: 3s;
}

.error-particles:nth-child(5) {
    width: 120px;
    height: 120px;
    top: 10%;
    left: 50%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.7;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.3;
    }
}

.error-page-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
    max-width: 800px;
    width: 100%;
    animation: fadeInUp 0.8s ease;
}

.error-visual {
    margin-bottom: 3rem;
    position: relative;
}

.error-code-container {
    position: relative;
    display: inline-block;
    margin-bottom: 1rem;
}

.error-code {
    font-size: 12rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
    display: block;
    line-height: 1;
    letter-spacing: -8px;
}

.error-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    height: 200px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: ripple 2s ease-out infinite;
}

@keyframes ripple {
    0% {
        width: 200px;
        height: 200px;
        opacity: 0.8;
    }
    100% {
        width: 400px;
        height: 400px;
        opacity: 0;
    }
}

.error-text-content {
    margin-bottom: 3rem;
}

.error-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    line-height: 1.2;
}

.error-message {
    font-size: 1.25rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.error-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.back-to-home-button,
.report-error-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-width: 200px;
    justify-content: center;
}

.back-to-home-button {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.back-to-home-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.report-error-button {
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    border: 2px solid transparent;
}

.report-error-button:hover {
    background: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.error-suggestions {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.suggestions-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.suggestion-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.suggestion-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.suggestion-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Responsive Design for Error Page */
@media screen and (max-width: 768px) {
    .error-page-content {
        padding: 1rem;
    }
    
    .error-code {
        font-size: 8rem;
        letter-spacing: -5px;
    }
    
    .error-title {
        font-size: 2rem;
    }
    
    .error-message {
        font-size: 1.1rem;
    }
    
    .error-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .back-to-home-button,
    .report-error-button {
        width: 100%;
        max-width: 300px;
    }
    
    .suggestion-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .suggestion-link {
        width: 100%;
        text-align: center;
    }
}

@media screen and (max-width: 480px) {
    .error-code {
        font-size: 6rem;
        letter-spacing: -3px;
    }
    
    .error-title {
        font-size: 1.75rem;
    }
    
    .error-message {
        font-size: 1rem;
    }
    
    .back-to-home-button,
    .report-error-button {
        font-size: 1rem;
        padding: 0.875rem 1.5rem;
    }
    
    .error-suggestions {
        padding: 1.5rem;
    }
}

 .main-content:has(.news-page) {
     padding: 0;
     max-width: 100%;
 }
 
 .news-page {
     max-width: 1200px;
     margin: 0 auto;
     padding: 3rem 2rem;
 }
 
 .news-search-form {
     display: flex;
     gap: 0.75rem;
     align-items: center;
     justify-content: center;
     margin: 0 auto 2rem;
     width: 100%;
     max-width: 1200px;
 }

 .news-search-card {
     width: 100%;
     background-color: #ffffff;
     border-radius: 18px;
     border: 1px solid rgba(0, 0, 0, 0.08);
     box-shadow: 0 14px 34px rgba(0, 0, 0, 0.06);
     padding: 1rem;
 }

 .news-tag-details {
     width: 100%;
     position: relative;
 }

 .news-tag-summary {
     list-style: none;
     cursor: pointer;
     user-select: none;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 0.75rem;
     padding: 0.65rem 0.9rem;
     border-radius: 999px;
     border: none;
     box-shadow: none;
     background-color: transparent;
     font-size: 0.95rem;
     font-weight: 600;
     color: #2c3e50;
 }

 .news-tag-summary::-webkit-details-marker {
     display: none;
 }

 .news-tag-summary::after {
     content: '▾';
     color: rgba(44, 62, 80, 0.75);
 }

 .news-tag-details[open] > .news-tag-summary::after,
 .news-sort-details[open] > .news-tag-summary::after,
 .news-advanced-details[open] > .news-tag-summary::after {
     content: '▴';
 }

 .news-advanced-details {
     width: 100%;
 }

 .news-advanced-details > .news-tag-summary {
     padding-left: 0;
     padding-right: 0;
     font-size: 0.85rem;
 }

 .news-advanced-details > .news-tag-summary .news-tag-summary-text {
     font-size: 0.85rem;
     font-weight: 600;
     color: #2c3e50;
 }

 .news-advanced-panel {
     margin-top: 0.65rem;
     display: flex;
     flex-direction: column;
     gap: 1.25rem;
 }

 .news-filters {
     width: 100%;
     display: flex;
     flex-direction: column;
     gap: 0.85rem;
     align-items: stretch;
 }

 .news-keyword-row {
     width: 100%;
     display: flex;
     gap: 0.75rem;
     align-items: center;
 }

 .news-keyword-row .news-search-input {
     flex: 1;
 }

 .news-keyword-row .news-search-button {
     flex: 0 0 auto;
 }

 .news-filter {
     display: flex;
     flex-direction: column;
     gap: 0.45rem;
 }

 .news-filter-label {
     font-size: 0.85rem;
     font-weight: 600;
     color: #2c3e50;
     letter-spacing: 0.2px;
 }
 
 .news-search-input {
     flex: 1;
     min-width: 160px;
     padding: 0.875rem 1rem;
     border-radius: 999px;
     border: 1px solid rgba(0, 0, 0, 0.12);
     background-color: #ffffff;
     font-size: 1rem;
     outline: none;
     transition: box-shadow 0.2s ease, border-color 0.2s ease;
 }
 
 .news-search-input:focus {
     border-color: rgba(52, 152, 219, 0.6);
     box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
 }
 
 .news-search-button {
     padding: 0.875rem 1.25rem;
     border-radius: 999px;
     border: 1px solid transparent;
     background-color: #3498db;
     color: #ffffff;
     font-weight: 600;
     cursor: pointer;
     transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
     white-space: nowrap;
 }
 
 .news-search-button:hover {
     background-color: #2980b9;
     transform: translateY(-2px);
     box-shadow: 0 10px 24px rgba(52, 152, 219, 0.25);
 }

 .news-tag-chips {
     display: flex;
     flex-wrap: wrap;
     gap: 0.5rem;
 }

 .news-tag-chip {
     border: 1px solid rgba(0, 0, 0, 0.12);
     background-color: #ffffff;
     color: #2c3e50;
     font-size: 0.95rem;
     font-weight: 600;
     padding: 0.5rem 1.25rem 0.5rem 1rem;
     border-radius: 999px;
     cursor: pointer;
     transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
     user-select: none;
 }

 .news-tag-chip:hover {
     background-color: rgba(52, 152, 219, 0.08);
     border-color: rgba(52, 152, 219, 0.35);
 }

 .news-tag-chip:active {
     transform: translateY(1px);
 }

 .news-tag-chip.is-selected {
     background-color: rgba(52, 152, 219, 0.12);
     border-color: rgba(52, 152, 219, 0.6);
     color: #1f5f8b;
 }

 .news-tag-chip::before {
     content: '✓';
     display: inline-block;
     width: 1.1em;
     margin-right: 0.4rem;
     opacity: 0;
 }

 .news-tag-chip.is-selected::before {
     opacity: 1;
 }

 .news-sort-details {
     width: 100%;
 }

 .news-sort-panel {
     margin-top: 0.65rem;
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 0.75rem;
 }

 .news-sort-select {
     width: 100%;
     padding: 0.875rem 1rem;
     border-radius: 999px;
     border: 1px solid rgba(0, 0, 0, 0.12);
     background-color: #ffffff;
     font-size: 1rem;
     color: #333;
     outline: none;
     cursor: pointer;
     transition: box-shadow 0.2s ease, border-color 0.2s ease;
 }

 .news-sort-select:focus {
     border-color: rgba(52, 152, 219, 0.6);
     box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.15);
 }
  
 .news-cards-container {
     display: grid;
     grid-template-columns: 1fr;
     gap: 1.5rem;
 }

 .news-cards-container > a {
     display: block;
     text-decoration: none;
     color: inherit;
 }
 
 .news-article-card {
     position: relative;
     border-radius: 16px;
     overflow: hidden;
     background-color: #ffffff;
     box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
     min-height: 220px;
     cursor: pointer;
     transform: translateZ(0);
     transition: transform 0.25s ease, box-shadow 0.25s ease;
 }
 
 .news-article-card:hover {
     transform: translateY(-6px);
     box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
 }
 
 .news-article-card-thumbnail-image {
     width: 100%;
     height: 100%;
     object-fit: cover;
     display: block;
     position: absolute;
     inset: 0;
     transform: scale(1.02);
     transition: transform 0.35s ease;
 }
 
 .news-article-card:hover .news-article-card-thumbnail-image {
     transform: scale(1.07);
 }
 
 .news-card-content {
     position: absolute;
     inset: 0;
     display: flex;
     flex-direction: column;
     justify-content: flex-end;
     gap: 0.5rem;
     padding: 1.25rem;
     background: linear-gradient(180deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.65) 100%);
 }
 
 .news-card-title {
     margin: 0;
     color: #ffffff;
     font-size: 1.35rem;
     font-weight: 700;
     line-height: 1.25;
     text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
 }
 
 .news-card-date {
     margin: 0;
     color: rgba(255, 255, 255, 0.9);
     font-size: 0.95rem;
     text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
 }
 
 .news-cards-container > p {
     grid-column: 1 / -1;
     text-align: center;
     color: #555;
     padding: 2rem 1rem;
 }

 .news-pagination {
     display: flex;
     align-items: center;
     justify-content: center;
     gap: 0.75rem;
     margin-top: 2rem;
 }

 .news-page-link {
     display: inline-flex;
     align-items: center;
     justify-content: center;
     padding: 0.55rem 0.9rem;
     border-radius: 999px;
     text-decoration: none;
     font-weight: 700;
     font-size: 0.95rem;
     border: 1px solid rgba(0, 0, 0, 0.12);
     background-color: #ffffff;
     color: #2c3e50;
     transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.12s ease;
 }

 .news-page-link:hover {
     background-color: rgba(52, 152, 219, 0.08);
     border-color: rgba(52, 152, 219, 0.35);
     transform: translateY(-1px);
 }

 .news-page-link--disabled {
     opacity: 0.45;
     cursor: not-allowed;
 }

 .news-page-status {
     font-weight: 700;
     color: #2c3e50;
     font-size: 0.95rem;
 }

 .article-page {
     max-width: 900px;
     margin: 0 auto;
     padding: 3rem 2rem;
 }

 .article-header {
     padding-bottom: 1.25rem;
     margin-bottom: 1.75rem;
     border-bottom: 1px solid rgba(0, 0, 0, 0.08);
 }

 .article-title {
     display: grid;
     grid-template-columns: 1fr;
     gap: 1.25rem;
     margin-bottom: 1.5rem;
 }

 .article-title-content {
     display: flex;
     flex-direction: column;
     gap: 0.35rem;
 }

 .article-title-title {
     margin: 0;
     font-size: 3rem;
     line-height: 1.2;
     font-weight: 800;
     color: #1f2d3d;
     letter-spacing: -0.02em;
 }

 .article-title-created-at {
     margin: 0;
     font-size: 0.95rem;
     font-weight: 600;
     color: rgba(44, 62, 80, 0.7);
 }

 .article-thumbnail-image {
     width: 100%;
     height: auto;
     aspect-ratio: 16 / 9;
     object-fit: cover;
     border-radius: 16px;
     display: block;
     box-shadow: 0 16px 34px rgba(0, 0, 0, 0.12);
 }

 .article-content {
     color: #1f2d3d;
     font-size: 1.05rem;
     line-height: 1.85;
 }

 .article-content h1,
 .article-content h2,
 .article-content h3,
 .article-content h4,
 .article-content h5,
 .article-content h6 {
     margin: 1.6rem 0 0.8rem;
     line-height: 1.25;
     color: #1f2d3d;
 }

 .article-content p {
     margin: 0 0 1rem;
 }

 .article-content ul,
 .article-content ol {
     margin: 0.25rem 0 1rem 1.25rem;
 }

 .article-content hr {
    border: none;
    height: 1px;
    background-color: rgba(0, 0, 0, 0.08);
    margin: 0 8px 0 8px;
 }


 .article-content img,
 .article-content video {
     max-width: 100%;
     height: auto;
     border-radius: 12px;
 }

 .article-content img.article-inline-image {
     display: block;
     margin: 1.25rem auto;
     width: min(100%, 720px);
     height: auto;
     border-radius: 16px;
     box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
     background-color: rgba(0, 0, 0, 0.04);
 }

 .article-content img.article-inline-image.img-wide {
     width: min(100%, 900px);
     aspect-ratio: 16 / 9;
     object-fit: cover;
 }

 .article-content img.article-inline-image.img-tall {
     width: min(100%, 520px);
     aspect-ratio: 3 / 4;
     object-fit: cover;
 }

 .article-content img.article-inline-image.img-square {
     width: min(100%, 560px);
     aspect-ratio: 1 / 1;
     object-fit: cover;
 }

 .article-content img.article-inline-image.img-full {
     width: 100%;
     max-width: none;
 }

 .article-content img.article-inline-image.img-left {
     margin-left: 0;
     margin-right: auto;
 }

 .article-content img.article-inline-image.img-right {
     margin-left: auto;
     margin-right: 0;
 }
 
 @media screen and (max-width: 768px) {
     .news-page {
         padding: 2.25rem 1.25rem;
     }
 
     .news-search-form {
         flex-direction: column;
         align-items: stretch;
     }

     .news-search-card {
         padding: 0.85rem;
     }

     .news-search-card-header {
         padding: 0.15rem 0.15rem 0.65rem;
     }

     .news-filters {
         gap: 0.75rem;
     }

     .news-keyword-row {
         flex-direction: column;
         align-items: stretch;
     }

     .news-keyword-row .news-search-button {
         width: 100%;
     }

     .news-sort-panel {
         grid-template-columns: 1fr;
     }
 }
 
 @media screen and (max-width: 480px) {
     .news-page {
         padding: 2rem 1rem;
     }
 
     .news-card-title {
         font-size: 1.2rem;
     }
 }

 .article-tags {
    width: 100%;
    display: flex;
    gap: 15px;
 }

 .article-tag {
    padding: 3px;
    background-color: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 2px;
    text-decoration: none;
    color: inherit;
 }

 .article-tag::before {
    content: "# ";
    opacity: 0.5;
 }

 /* codehilite */

 pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.codehilite .hll { background-color: #ffffcc }
.codehilite { background: #f8f8f8; }
.codehilite .c { color: #3D7B7B; font-style: italic } /* Comment */
.codehilite .err { border: 1px solid #F00 } /* Error */
.codehilite .k { color: #008000; font-weight: bold } /* Keyword */
.codehilite .o { color: #666 } /* Operator */
.codehilite .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
.codehilite .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
.codehilite .cp { color: #9C6500 } /* Comment.Preproc */
.codehilite .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
.codehilite .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
.codehilite .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
.codehilite .gd { color: #A00000 } /* Generic.Deleted */
.codehilite .ge { font-style: italic } /* Generic.Emph */
.codehilite .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.codehilite .gr { color: #E40000 } /* Generic.Error */
.codehilite .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.codehilite .gi { color: #008400 } /* Generic.Inserted */
.codehilite .go { color: #717171 } /* Generic.Output */
.codehilite .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.codehilite .gs { font-weight: bold } /* Generic.Strong */
.codehilite .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.codehilite .gt { color: #04D } /* Generic.Traceback */
.codehilite .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.codehilite .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.codehilite .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.codehilite .kp { color: #008000 } /* Keyword.Pseudo */
.codehilite .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.codehilite .kt { color: #B00040 } /* Keyword.Type */
.codehilite .m { color: #666 } /* Literal.Number */
.codehilite .s { color: #BA2121 } /* Literal.String */
.codehilite .na { color: #687822 } /* Name.Attribute */
.codehilite .nb { color: #008000 } /* Name.Builtin */
.codehilite .nc { color: #00F; font-weight: bold } /* Name.Class */
.codehilite .no { color: #800 } /* Name.Constant */
.codehilite .nd { color: #A2F } /* Name.Decorator */
.codehilite .ni { color: #717171; font-weight: bold } /* Name.Entity */
.codehilite .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
.codehilite .nf { color: #00F } /* Name.Function */
.codehilite .nl { color: #767600 } /* Name.Label */
.codehilite .nn { color: #00F; font-weight: bold } /* Name.Namespace */
.codehilite .nt { color: #008000; font-weight: bold } /* Name.Tag */
.codehilite .nv { color: #19177C } /* Name.Variable */
.codehilite .ow { color: #A2F; font-weight: bold } /* Operator.Word */
.codehilite .w { color: #BBB } /* Text.Whitespace */
.codehilite .mb { color: #666 } /* Literal.Number.Bin */
.codehilite .mf { color: #666 } /* Literal.Number.Float */
.codehilite .mh { color: #666 } /* Literal.Number.Hex */
.codehilite .mi { color: #666 } /* Literal.Number.Integer */
.codehilite .mo { color: #666 } /* Literal.Number.Oct */
.codehilite .sa { color: #BA2121 } /* Literal.String.Affix */
.codehilite .sb { color: #BA2121 } /* Literal.String.Backtick */
.codehilite .sc { color: #BA2121 } /* Literal.String.Char */
.codehilite .dl { color: #BA2121 } /* Literal.String.Delimiter */
.codehilite .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.codehilite .s2 { color: #BA2121 } /* Literal.String.Double */
.codehilite .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
.codehilite .sh { color: #BA2121 } /* Literal.String.Heredoc */
.codehilite .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
.codehilite .sx { color: #008000 } /* Literal.String.Other */
.codehilite .sr { color: #A45A77 } /* Literal.String.Regex */
.codehilite .s1 { color: #BA2121 } /* Literal.String.Single */
.codehilite .ss { color: #19177C } /* Literal.String.Symbol */
.codehilite .bp { color: #008000 } /* Name.Builtin.Pseudo */
.codehilite .fm { color: #00F } /* Name.Function.Magic */
.codehilite .vc { color: #19177C } /* Name.Variable.Class */
.codehilite .vg { color: #19177C } /* Name.Variable.Global */
.codehilite .vi { color: #19177C } /* Name.Variable.Instance */
.codehilite .vm { color: #19177C } /* Name.Variable.Magic */
.codehilite .il { color: #666 } /* Literal.Number.Integer.Long */
