/* APTI MVP Site Styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@300;400;500;700&family=Roboto:wght@300;400;500;700&display=swap');

/* CSS Variables */
:root {
    --main-color: #1E3A8A; /* Navy Blue */
    --accent-color: #10B981; /* Light Green */
    --base-color: #FFFFFF; /* White */
    --text-color: #333333;
    --gray-light: #F8F9FA;
    --gray-medium: #6B7280;
    --font-jp: 'Noto Sans JP', sans-serif;
    --font-en: 'Roboto', sans-serif;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-jp);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--base-color);
}

/* Header Styles */
header {
    background-color: var(--base-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo img {
    height: 240px;
    max-width: 100%;
    /* Performance optimizations while maintaining design */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Prevent layout shift */
    width: auto;
}

.nav-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

/* Language Switcher Styles */
.language-switcher select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--main-color);
    border-radius: 6px;
    background-color: white;
    color: var(--main-color);
    font-family: var(--font-jp);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-switcher select:hover {
    background-color: var(--main-color);
    color: white;
}

.language-switcher select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.2);
}

nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--main-color);
}

/* Default desktop behavior - show nav, hide mobile menu */
@media screen and (min-width: 1025px) {
    .mobile-menu-btn {
        display: none !important;
    }

    .nav-content {
        display: flex !important;
        position: static !important;
        flex-direction: row !important;
        background: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        height: auto !important;
        width: auto !important;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    /* Ensure button is clickable */
    pointer-events: auto;
    /* Add visual feedback */
    transition: background-color 0.2s ease;
}

.mobile-menu-btn:hover {
    background-color: rgba(30, 58, 138, 0.1);
    border-radius: 4px;
}

.mobile-menu-btn:active {
    background-color: rgba(30, 58, 138, 0.2);
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--main-color);
    margin: 2px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    position: relative;
}

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

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

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--main-color) 0%, #2563EB 100%);
    color: white;
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero > * {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-color);
    color: white;
}

.btn-primary:hover {
    background-color: #0D9488;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--main-color);
    border-color: var(--main-color);
}

.btn-secondary:hover {
    background-color: var(--main-color);
    color: white;
}

/* Hero section specific button styles */
.hero .btn-secondary {
    color: white;
    border-color: white;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

section {
    margin-bottom: 3rem;
}

/* About Page Styles */
.about-content section {
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.about-content section:not(:last-child) {
    border-bottom: 1px solid var(--gray-light);
}

.about-pillars {
    background-color: var(--gray-light);
    padding: 3rem 2rem;
    margin: 0 -2rem;
    border-radius: 8px;
}

.pillar {
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--accent-color);
}

.pillar:last-child {
    margin-bottom: 0;
}

.pillar h3 {
    color: var(--main-color);
    margin-bottom: 1rem;
}

.founders-note {
    font-style: italic;
    color: var(--gray-medium);
    text-align: center;
    padding: 2rem;
    background-color: var(--gray-light);
    border-radius: 6px;
}

/* Privacy Policy Styles */
.privacy-content {
    max-width: 1000px;
    margin: 0 auto;
}

.privacy-section {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray-light);
}

.privacy-section:last-child {
    border-bottom: none;
}

.last-updated {
    font-size: 0.9rem;
    color: var(--gray-medium);
    font-style: italic;
    margin-bottom: 2rem;
}

.privacy-section h2 {
    color: var(--main-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-left: 4px solid var(--accent-color);
    padding-left: 1rem;
}

.privacy-section ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.privacy-section li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.contact-info {
    background-color: var(--gray-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
}

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

.contact-info p:last-child {
    margin-bottom: 0;
}

h1 {
    font-size: 2.5rem;
    color: var(--main-color);
    margin-bottom: 2rem;
    text-align: center;
}

h2 {
    font-size: 2rem;
    color: var(--main-color);
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--main-color);
    margin-bottom: 0.75rem;
}

/* Latest News Section */
.latest-news {
    background-color: var(--gray-light);
    padding: 3rem 2rem;
    margin: 0 -2rem;
}

.news-list {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.news-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.news-date {
    color: var(--gray-medium);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Form Styles */
.form-container {
    background-color: var(--gray-light);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

/* Footer */
footer {
    background-color: var(--main-color);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

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

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

/* IAB Standards Page Styles */
.iab-standards-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.standards-intro {
    background-color: var(--gray-light);
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
}

.standards-intro .note {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 4px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.standards-list {
    margin-bottom: 3rem;
}

.standard-item {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.standard-item h3 {
    color: var(--main-color);
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.standard-description {
    color: var(--gray-medium);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

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

.available-translations {
    border-top: 2px solid var(--gray-light);
    padding-top: 3rem;
    margin-bottom: 3rem;
}

.translations-intro {
    font-size: 1.1rem;
    color: var(--gray-medium);
    margin-bottom: 2rem;
    text-align: center;
}

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

.translation-card {
    background: white;
    border: 1px solid var(--gray-light);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.translation-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.translation-card h3 {
    color: var(--main-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.translation-card p {
    color: var(--gray-medium);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.translation-card .btn {
    width: 100%;
    justify-content: center;
}

.translation-content {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.translation-content h3 {
    color: var(--main-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

.translation-note {
    background: #e3f2fd;
    border-left: 4px solid var(--main-color);
    padding: 1.5rem;
    border-radius: 0 4px 4px 0;
}

.translation-note p {
    margin-bottom: 0.5rem;
}

.translation-note p:last-child {
    margin-bottom: 0;
}

.contribution-section {
    background: var(--gray-light);
    padding: 2rem;
    border-radius: 8px;
}

.translation-principles {
    margin-top: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
}

.translation-principles h3 {
    color: var(--main-color);
    margin-bottom: 1rem;
}

.translation-principles ul {
    list-style-type: disc;
    padding-left: 2rem;
}

.translation-principles li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    nav {
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        position: relative;
    }

    .logo img {
        height: 80px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-content {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: white;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        padding: 4rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        flex-direction: column;
        gap: 2rem;
        overflow-y: auto;
    }

    .nav-content.active {
        right: 0;
    }

    /* Mobile menu overlay */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    nav ul {
        flex-direction: column;
        gap: 1.5rem;
        margin: 0;
        width: 100%;
    }

    nav ul li {
        width: 100%;
        text-align: left;
    }

    nav ul li a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--gray-light);
    }

    .language-switcher {
        width: 100%;
        margin-top: 1rem;
    }

    .language-switcher select {
        width: 100%;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
    
    main {
        padding: 1rem;
    }
    
    .latest-news {
        margin: 0 -1rem;
        padding: 2rem 1rem;
    }
}

/* Force show mobile menu on tablets and phones */
@media screen and (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex !important;
    }

    nav {
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        position: relative;
    }

    .nav-content {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background-color: white;
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        padding: 4rem 2rem 2rem;
        transition: right 0.3s ease;
        z-index: 1000;
        flex-direction: column;
        gap: 2rem;
        overflow-y: auto;
    }

    .nav-content.active {
        right: 0;
    }

    nav ul {
        flex-direction: column;
        gap: 1.5rem;
        margin: 0;
        width: 100%;
    }

    nav ul li {
        width: 100%;
        text-align: left;
    }

    nav ul li a {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--gray-light);
    }

    .language-switcher {
        width: 100%;
        margin-top: 1rem;
    }

    .language-switcher select {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .logo img {
        height: 60px;
    }
    
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
}