:root {
    --sosai-red: #E60012;
    --sosai-white: #FFFFFF;
    --sosai-black: #000000;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --font-main: 'Inter', 'Noto Sans TC', sans-serif;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-main);
    background-color: var(--sosai-white);
    color: var(--gray-900);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

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

/* Navbar */
.navbar {
    height: 80px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--gray-100);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
    text-decoration: none;
    z-index: 1001;
}

.logo-box {
    padding: 4px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    box-sizing: border-box;
}

.logo-box.red {
    background-color: var(--sosai-red);
    color: var(--sosai-white);
    border: 2px solid var(--sosai-red);
}

.logo-box.white {
    background-color: var(--sosai-white);
    color: var(--sosai-red);
    border: 2px solid var(--sosai-red);
    margin-left: -2px;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--gray-800);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-links a.btn-red {
    color: var(--sosai-white);
    font-weight: 800;
}

.nav-links a:hover {
    color: var(--sosai-red);
}

.nav-links a.btn-red:hover {
    color: var(--sosai-white);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1002;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--gray-800);
    margin: 3px 0;
    transition: 0.4s;
}

/* Mobile Nav Styles */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 80%;
        max-width: 300px;
        background-color: var(--sosai-white);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transition: right 0.3s ease-in-out, visibility 0.3s;
        z-index: 1000;
        padding-top: 60px;
        visibility: hidden;
    }

    .nav-links.active {
        right: 0;
        visibility: visible;
    }
    
    /* Hamburger Animation */
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    border: none;
    font-size: 1rem;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-red {
    background-color: var(--sosai-red);
    color: var(--sosai-white);
}

.btn-red:hover {
    background-color: #c0000f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(230, 0, 18, 0.2);
}

/* Hero Section */
.hero {
    padding: 80px 0 0; /* Reduced top padding, no bottom padding */
    display: flex;
    align-items: center;
    min-height: auto; /* Remove min-height to fit content */
}

.hero .container {
    display: flex; /* Changed from grid to flex */
    flex-direction: column;
    gap: 40px; /* Gap between main content and news */
    width: 100%;
}

.hero-main-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    width: 100%;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    font-weight: 900;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.highlight {
    color: var(--sosai-red);
}

.sub-headline {
    font-size: 1.5rem;
    color: var(--gray-800);
    margin-bottom: 24px;
    max-width: 600px;
}

.value-prop {
    font-size: 1.1rem;
    color: var(--gray-800);
    margin-bottom: 40px;
    border-left: 4px solid var(--sosai-red);
    padding-left: 20px;
}

.hero-image-container {
    width: 100%;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-container img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,0.1));
}

@media (max-width: 1024px) {
    .hero {
        padding: 60px 0 0;
    }
    .hero h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0 0;
        text-align: center;
    }

    .hero-main-content {
        grid-template-columns: 1fr; /* Single column */
        gap: 40px;
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-visual {
        order: 2;
        margin-top: 20px;
    }

    .hero h1 {
        font-size: 2.2rem; /* Smaller for mobile */
    }

    .sub-headline {
        font-size: 1.1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .value-prop {
        font-size: 1rem;
        text-align: left;
        margin: 0 auto 30px;
        max-width: 400px;
    }

    .btn-lg {
        width: 100%; /* Full width button */
    }
}

/* Integrated News Carousel Section */
.news-section-integrated {
    width: 100%;
    padding: 40px 0;
    border-top: 1px solid var(--gray-100);
}

.news-carousel-container {
    position: relative;
    overflow: hidden; /* Reverted from visible to hidden */
    padding: 0 20px; /* Add some padding so cards don't touch the edges */
    margin: 0 -20px; /* Counteract the container padding */
}

.news-carousel {
    display: flex;
    gap: 20px;
    padding: 10px 0;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}

.news-carousel:active {
    cursor: grabbing;
}

.news-card {
    min-width: 320px; /* Slightly smaller cards */
    background: var(--gray-50);
    padding: 25px 30px;
    border-radius: 8px;
    border: 1px solid var(--gray-100);
    text-decoration: none;
    color: var(--gray-900);
    display: block;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.news-card.highlighted {
    border-color: var(--sosai-red);
    border-width: 2px;
}

.news-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.news-card-media {
    font-weight: 600;
    background: var(--sosai-red);
    color: var(--sosai-white);
    padding: 2px 8px;
    border-radius: 4px;
}

.news-card-title {
    font-size: 1.1rem; /* Slightly smaller title for the card */
    font-weight: 700;
    line-height: 1.4;
}

.news-actions {
    text-align: center; /* Centered the button */
    margin-top: 20px;
}

.news-actions .btn-sm {
    border-color: var(--gray-200);
    color: var(--gray-800);
}

.news-actions .btn-sm:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
}

/* Controls for the news carousel */
.news-section-integrated .carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.news-section-integrated .carousel-btn {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-800);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.news-section-integrated .carousel-btn:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}


@media (max-width: 768px) {
    .news-card { min-width: 80vw; }
    .news-section-integrated { padding: 30px 0; }
    .news-actions { text-align: center; margin-top: 30px;}
    .news-actions .btn-sm { width: 100%;}
    .news-section-integrated .carousel-controls {
        display: none; /* Hide buttons on mobile where swipe is primary */
    }
}

/* News List Page */
.news-list-page {
    padding: 80px 0;
    background-color: var(--sosai-white);
}

.news-list-page .section-title {
    margin-bottom: 60px;
    color: var(--gray-900);
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.news-list-item {
    display: grid;
    grid-template-columns: 120px 150px 1fr;
    gap: 24px;
    align-items: center;
    padding: 20px;
    background: var(--sosai-white);
    border-radius: 8px;
    border: 1px solid var(--gray-100);
    text-decoration: none;
    color: var(--gray-900);
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-list-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

.news-list-item.highlighted {
    border-color: var(--sosai-red);
    border-width: 2px;
}

.news-item-date {
    font-size: 0.95rem;
    color: var(--gray-800);
}

.news-item-media {
    font-weight: 600;
    font-size: 1rem;
}

.news-item-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.5;
}

.nav-links a.active {
    color: var(--sosai-red);
    font-weight: 700;
}


@media (max-width: 768px) {
    .news-list-page { padding: 40px 0; }
    
    .news-list-item {
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: flex-start;
        padding: 16px;
    }

    .news-item-date {
        font-size: 0.85rem;
        order: 1; /* Date first */
    }

    .news-item-title {
        font-size: 1rem;
        order: 2; /* Title second */
    }
    
    .news-item-media {
        order: 3; /* Media last */
    }
}

/* Methodology Section */
.methodology {
    padding: 100px 0;
    background-color: var(--gray-50);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 80px;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gray-100);
    z-index: 1;
}

.timeline-item {
    position: relative;
    z-index: 2;
    text-align: center;
}

.time-mark {
    width: 80px;
    height: 80px;
    background-color: var(--sosai-red);
    color: var(--sosai-white);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 auto 24px;
    transition: transform 0.3s;
}

.time-mark small {
    font-size: 0.8rem;
    opacity: 0.8;
}

.timeline-item:hover .time-mark {
    transform: scale(1.1);
}

.timeline-content h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

@media (max-width: 768px) {
    .methodology { padding: 60px 0; }
    .section-title { font-size: 1.8rem; margin-bottom: 40px; }
    
    .timeline {
        grid-template-columns: 1fr;
        gap: 30px;
        padding-left: 20px; /* Space for vertical line */
    }
    
    .timeline::before {
        width: 2px;
        height: 100%;
        left: 39px; /* Align with circle center */
        top: 0;
        bottom: 0;
    }
    
    .timeline-item {
        display: flex;
        align-items: flex-start;
        text-align: left;
        gap: 20px;
    }
    
    .time-mark {
        flex-shrink: 0;
        margin: 0; /* Remove auto margin */
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
    
    .timeline::before {
        left: 29px; /* Correct alignment for 60px circle */
    }
}

/* Features Section */
.features {
    padding: 100px 0;
}

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

.feature-card {
    padding: 40px;
    background: var(--gray-50);
    border-radius: 8px;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    text-align: left;
}

.feature-icon {
    font-size: 2.5rem;
    line-height: 1;
    margin-bottom: 24px;
    display: block;
}

.feature-card h3 {
    margin-bottom: 16px;
    font-size: 1.4rem;
    line-height: 1.3;
    font-weight: 800;
}

.feature-card p {
    color: var(--gray-800);
    font-size: 1rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .features { padding: 60px 0; }
    .feature-card { padding: 30px 20px; }
}

/* Case Studies Carousel */
.cases {
    padding: 100px 0;
    background-color: var(--sosai-black);
    color: var(--sosai-white);
}

.cases .section-title {
    color: var(--sosai-white);
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel {
    display: flex;
    gap: 20px;
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 20px 0;
    cursor: grab;
    user-select: none;
    touch-action: pan-y;
}

.carousel:active {
    cursor: grabbing;
}

.carousel.grabbing {
    cursor: grabbing;
    transition: none;
}

.case-card {
    min-width: 350px;
    background: #1a1a1a;
    padding: 40px;
    border-radius: 8px;
    border-left: 4px solid var(--sosai-red);
}

.case-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--sosai-red);
    color: var(--sosai-white);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.case-card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.carousel-btn {
    background: transparent;
    border: 1px solid var(--sosai-white);
    color: var(--sosai-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s;
}

.carousel-btn:hover {
    background: var(--sosai-white);
    color: var(--sosai-black);
}

@media (max-width: 768px) {
    .cases { padding: 60px 0; }
    .case-card { min-width: 85vw; padding: 30px; } /* Nearly full width cards on mobile */
}

/* Team Section */
.team {
    padding: 100px 0;
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.member-card {
    background: var(--gray-50);
    padding: 40px;
    border-radius: 8px;
    /* Removed display: flex, align-items, gap to stack vertically */
}

.member-image {
    width: 200px;
    height: 200px;
    background-color: #E5E7EB;
    border-radius: 8px;
    /* Removed flex-shrink: 0; */
    background-size: cover;
    background-position: center;
    margin: 0 auto 20px auto; /* Center and add space below */
}

.member-info h3 {
    font-size: 1.6rem;
    margin-bottom: 4px;
    font-weight: 900;
}

.en-name {
    display: block;
    font-size: 1.1rem;
    color: var(--gray-800);
    font-weight: 500;
    margin-bottom: 4px;
    opacity: 0.8;
}

.role {
    display: block;
    color: var(--sosai-red);
    font-weight: 700;
    margin-bottom: 16px;
    font-size: 0.95rem;
    letter-spacing: 0.05em;
}

.member-info {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--gray-800);
    text-align: center; /* Center the text content */
}

.member-bio p {
    margin-bottom: 12px;
}

.member-social-links {
    display: flex;
    gap: 12px;
    margin: 20px auto 20px auto; /* Center and add space above and below */
    justify-content: center; /* Center icons horizontally */
}

.member-social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px; /* Icon size */
    height: 36px; /* Icon size */
    border-radius: 50%;
    background-color: var(--gray-100);
    transition: background-color 0.2s;
}

.member-social-links a:hover {
    background-color: var(--sosai-red);
}

.member-social-links a:hover .social-icon {
    filter: brightness(0) invert(1); /* Changes icon color to white on hover */
}

.social-icon {
    width: 20px; /* Image size inside the circle */
    height: 20px; /* Image size inside the circle */
    object-fit: contain;
}


@media (max-width: 768px) {
    .member-card {
        text-align: center; /* Center align items in member-card for mobile */
    }
    .member-social-links {
        justify-content: center; /* Center icons for mobile */
    }
}

@media (max-width: 768px) {
    .team { padding: 60px 0; }
    .team-grid { grid-template-columns: 1fr; }
    .member-card { flex-direction: column; text-align: center; padding: 30px; }
    .member-image { width: 150px; height: 150px; margin: 0 auto; }
    .member-info { width: 100%; }
}

/* Ecosystem */
.ecosystem {
    padding: 100px 0;
    background: var(--sosai-red);
    color: var(--sosai-white);
}

.ecosystem .section-title {
    color: var(--sosai-white);
    margin-bottom: 60px;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.resource-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 40px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    transition: transform 0.3s, background 0.3s;
}

.resource-card:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.resource-card h3 {
    font-size: 1.4rem;
    margin-bottom: 16px;
    font-weight: 700;
    line-height: 1.4;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.resource-icon {
    font-size: 1.6rem;
    line-height: 1.2;
    flex-shrink: 0;
}

.resource-card p {
    font-size: 1rem;
    line-height: 1.7;
    opacity: 0.95;
    text-align: justify;
}

@media (max-width: 768px) {
    .ecosystem { padding: 60px 0; }
    .resource-grid { grid-template-columns: 1fr; }
    .resource-card { padding: 30px; }
    .resource-card h3 { font-size: 1.25rem; }
}

/* Pricing */
.pricing {
    padding: 100px 0;
    background-color: var(--gray-50);
}

.pricing-grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    margin-bottom: 60px;
    flex-wrap: wrap;
}

.pricing-card {
    background: var(--sosai-white);
    padding: 40px 30px;
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    text-align: center;
    flex: 1;
    min-width: 300px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.pricing-card.recommended {
    border: 2px solid #10B981;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: #10B981;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

.plan-header {
    margin-bottom: 20px;
    height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pricing-card h3 {
    font-size: 1.5rem;
    margin-bottom: 4px;
    font-weight: 800;
}

.plan-desc {
    color: var(--gray-800);
    font-size: 0.9rem;
    opacity: 0.8;
}

.plan-price {
    margin-bottom: 24px;
    color: var(--gray-900);
    height: 50px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.plan-price .currency {
    font-size: 1rem;
    font-weight: 600;
}

.plan-price .amount {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
}

.plan-price .period {
    font-size: 1rem;
    color: var(--gray-800);
    font-weight: 500;
}

/* Pricing Split Layout */
.pricing-split {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: left;
    margin-top: 20px;
    flex-grow: 1;
}

.split-section {
    padding: 16px 0;
    border-top: 1px solid var(--gray-100);
}

.split-section:first-child {
    border-top: none;
    padding-top: 0;
}

.split-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-50);
    padding: 6px 10px;
    border-radius: 4px;
}

.split-list {
    list-style: none;
    padding-left: 4px;
    min-height: 96px; /* Enforce height for 3 items to align sections */
}

.split-list li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    position: relative;
    padding-left: 16px;
    line-height: 1.5;
    color: var(--gray-800);
}

.split-list li::before {
    content: '•';
    color: var(--sosai-red);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.price-highlight {
    color: var(--sosai-red);
    font-weight: 700;
}

.price-free {
    color: #10B981;
    font-weight: 700;
}

.expert-rate-box {
    /* Keep for backward compatibility or remove if fully replaced */
    display: none; 
}

.btn-block {
    width: 100%;
    display: block;
    text-align: center;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-900);
    color: var(--gray-900);
}

.btn-outline:hover {
    background: var(--gray-900);
    color: white;
}

@media (max-width: 900px) {
    .pricing { padding: 60px 0; }
    .pricing-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .pricing-card {
        width: 100%;
        max-width: 400px;
    }

    .pricing-card.recommended {
        order: -1;
    }
}

/* FAQ */
.faq-section {
    background: var(--gray-900);
    color: var(--sosai-white);
    padding: 60px;
    border-radius: 8px;
    text-align: center;
}

.faq-section h3 {
    font-size: 2rem;
    margin-bottom: 30px;
}

.faq-item {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.2rem;
    line-height: 1.8;
}

@media (max-width: 768px) {
    .faq-section { padding: 40px 20px; }
    .faq-section h3 { font-size: 1.5rem; }
    .faq-item { font-size: 1rem; text-align: left; }
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

/* Modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.6); 
    backdrop-filter: blur(5px);
}

.modal.show {
    display: block;
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    padding: 40px;
    border: 1px solid #888;
    width: 90%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    
    /* Absolute Centering */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2001;
    margin: 0;
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--sosai-red);
    text-decoration: none;
    cursor: pointer;
}

.modal-content h3 {
    margin-bottom: 12px;
    font-size: 1.5rem;
}

.modal-content p {
    margin-bottom: 24px;
    color: var(--gray-800);
}

.modal-content input[type="email"],
.modal-content input[type="text"],
.modal-content textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    outline: none;
    font-family: var(--font-main);
}

.modal-content input[type="email"]:focus,
.modal-content input[type="text"]:focus,
.modal-content textarea:focus {
    border-color: var(--sosai-red);
}

/* Validation Styles */
.field-error {
    color: var(--sosai-red);
    font-size: 0.85rem;
    text-align: left;
    margin-top: -12px;
    margin-bottom: 12px;
    display: none;
    font-weight: 600;
}

.field-error.show {
    display: block;
    animation: fadeIn 0.3s;
}

.modal-content input.invalid {
    border-color: var(--sosai-red);
    background-color: #FEF2F2;
}

.modal-content input.valid {
    border-color: #10B981;
    background-color: #ECFDF5;
}

#modalMessage {
    margin-top: 16px;
    font-size: 0.95rem;
    font-weight: 600;
}

.success-msg { color: #10B981; }
.error-msg { color: var(--sosai-red); }

@media (max-width: 600px) {
    .modal-content { padding: 30px 20px; width: 95%; }
}

/* Footer */
.footer {
    background-color: #1a1a1a;
    color: #d1d5db;
    padding: 80px 0 30px;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer-logo {
    display: flex;
    align-items: center;
    font-weight: 900;
    font-size: 1.5rem;
    letter-spacing: -0.05em;
    text-decoration: none;
    width: fit-content;
}

.footer-desc {
    font-size: 0.95rem;
    line-height: 1.8;
    color: #9ca3af;
    max-width: 300px;
}

.footer h4 {
    color: var(--sosai-white);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: 0.05em;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 16px;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--sosai-white);
}

.footer-contact p {
    margin-bottom: 12px;
    color: #9ca3af;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 30px;
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 600px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer {
        padding: 60px 0 30px;
    }
}
