/* Reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --base: #f9f9f9;
    --base-2: #ffffff;
    --contrast: #111111;
    --contrast-2: #636363;
    --accent-3: #d8613c;
    --accent-5: #b5bdbc;
    --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-heading: "Cardo", Georgia, serif;
}

body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.55;
    color: var(--contrast);
    background: var(--base);
}

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

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

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--base);
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 8vw, 6.5rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    width: 141px;
    height: auto;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-list a {
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
}

.nav-list a:hover {
    color: var(--accent-3);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

/* Page Banner */
.page-banner {
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden;
    margin-top: 88px;
}

.page-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-banner::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
}

.page-banner-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-family: var(--font-heading);
    z-index: 10;
    letter-spacing: 0.5rem;
}

/* Sections */
.section {
    padding: clamp(2.5rem, 8vw, 6.5rem) 0;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 clamp(1rem, 8vw, 6.5rem);
}

/* Section Title */
.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 3vw, 2.5rem);
    color: var(--accent-3);
    text-align: center;
    margin-bottom: 3rem;
}

/* Product Item */
.product-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-bottom: 4rem;
}

.product-item:nth-child(even) {
    direction: rtl;
}

.product-item:nth-child(even) > * {
    direction: ltr;
}

.product-image img {
    border-radius: 20px;
    width: 100%;
}

.product-info h3 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: var(--accent-3);
    margin-bottom: 1rem;
}

.product-info p {
    color: var(--contrast-2);
    line-height: 1.8;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
}

/* Separator */
.separator {
    height: 1px;
    background: linear-gradient(to right, transparent, var(--accent-3), transparent);
    margin: 3rem auto;
    max-width: 80%;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-image img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.card-content h3 a {
    color: var(--contrast);
}

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

.card-content p {
    color: var(--contrast-2);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card-content .date {
    color: var(--contrast-2);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.card-image a {
    display: block;
}

/* News Detail */
.news-detail-section {
    min-height: 60vh;
}

.news-loading,
.news-error {
    text-align: center;
    color: var(--contrast-2);
    padding: 3rem 0;
}

.news-back {
    display: inline-block;
    color: var(--accent-3);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    transition: opacity 0.3s;
}

.news-back:hover {
    opacity: 0.8;
}

.news-article {
    max-width: 800px;
    margin: 0 auto;
    border-radius: 10px;
    padding: clamp(1.5rem, 4vw, 3rem);
}

.news-article-header {
    margin-bottom: 2rem;
}

.news-article-date {
    display: block;
    color: var(--contrast-2);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.news-article-title {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.35;
    color: var(--contrast);
}

.news-article-cover {
    margin-bottom: 2rem;
    border-radius: 10px;
    overflow: hidden;
}

.news-article-cover img {
    width: 100%;
    max-height: 480px;
    object-fit: cover;
}

.news-article-body {
    color: var(--contrast-2);
    line-height: 1.9;
    font-size: 1.05rem;
}

.news-article-body p {
    margin-bottom: 1.25rem;
}

.news-article-body figure {
    margin: 2rem 0;
}

.news-article-body img {
    border-radius: 8px;
    margin: 0 auto;
}

.news-not-found {
    text-align: center;
    padding: 4rem 0;
}

.news-not-found h1 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}

/* IP Grid */
.ip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.ip-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.ip-item:hover {
    transform: translateY(-3px);
}

.ip-item img {
    width: 100%;
    height: auto;
    display: block;
}

.ip-item .ip-name {
    padding: 1rem;
    text-align: center;
    font-weight: 500;
    color: var(--contrast);
}

/* Join Section */
.join-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.join-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.join-content {
    padding: clamp(1rem, 3vw, 2.5rem);
    background: var(--contrast-2);
}

.join-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 3vw, 2.5rem);
    color: var(--base-2);
    margin-bottom: 1.5rem;
}

.join-content p {
    color: var(--base);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.join-content .contact-info {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.join-content .contact-info p {
    margin-bottom: 0.5rem;
}

/* Carousel */
.carousel-section {
    overflow: hidden;
}

.carousel-track {
    display: flex;
    animation: scrollCarousel 21s linear infinite;
}

.carousel-track:hover {
    animation-play-state: paused;
}

.carousel-item {
    flex: 0 0 600px;
    margin-right: 20px;
}

.carousel-item img {
    width: 600px;
    height: 350px;
    object-fit: cover;
    border-radius: 10px;
}

@keyframes scrollCarousel {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-620px * 6)); }
}

/* Footer */
.footer {
    background: var(--contrast-2);
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.footer-content {
    text-align: center;
}

.footer-copyright {
    color: var(--base);
    margin-bottom: 0.5rem;
}

.footer-contact {
    color: var(--base);
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-contact a {
    color: var(--base);
}

.footer-contact a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1024px) {
    .product-item,
    .product-item:nth-child(even) {
        grid-template-columns: 1fr;
        direction: ltr;
    }

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

    .page-banner {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .nav-list {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--base);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .nav-list.active {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

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

    .ip-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .carousel-item {
        flex: 0 0 300px;
    }

    .carousel-item img {
        width: 300px;
        height: 200px;
    }

    @keyframes scrollCarousel {
        0% { transform: translateX(0); }
        100% { transform: translateX(calc(-320px * 6)); }
    }
}
