/* ==========================================
   BLACK FLAG SEO - CSS Styles
   ========================================== */

/* CSS Variables */
:root {
    --primary: #d4af37;
    --primary-hover: #b89b30;
    --background: #0a0a0a;
    --background-alt: #0f0f0f;
    --card: #1a1a1a;
    --text: #f5f5f0;
    --text-muted: #9ca3af;
    --text-gray: #d1d5db;
    --destructive: #b00000;
    --border: rgba(255, 255, 255, 0.1);
    --border-gold: rgba(212, 175, 55, 0.2);
    --border-gold-hover: rgba(212, 175, 55, 0.5);
    --radius: 0.5rem;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', system-ui, sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

.text-gold {
    color: var(--primary);
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    border-radius: var(--radius);
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--background);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: var(--background);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--primary);
}

.btn-large {
    padding: 1.5rem 2rem;
    font-size: 1.125rem;
}

.btn-xlarge {
    padding: 1.5rem 3rem;
    font-size: 1.25rem;
}

.btn-telegram {
    gap: 1rem;
}

.telegram-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* ==========================================
   HEADER
   ========================================== */
header {
    border-bottom: 1px solid var(--border);
    padding: 1.5rem 0;
    position: relative;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo img {
    width: 3.25rem;
    height: 3.25rem;
}

.logo span {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.nav-desktop {
    display: none;
    align-items: center;
    gap: 2rem;
}

.nav-desktop a {
    font-family: 'Oswald', sans-serif;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-mobile {
    display: none;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    background-color: var(--background);
    border-top: 1px solid var(--border);
}

.nav-mobile.active {
    display: flex;
}

.nav-mobile a {
    font-family: 'Oswald', sans-serif;
    font-size: 1rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.5rem 0;
}

.header-lang {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border);
    border-radius: 0.25rem;
}

.header-lang .lang-link {
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.125rem 0.25rem;
    transition: color 0.3s ease;
}

.header-lang .lang-link:hover {
    color: var(--primary);
}

.header-lang .lang-link.active {
    color: var(--primary);
}

.header-lang .lang-divider {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.nav-mobile .header-lang {
    justify-content: center;
    margin: 0.5rem 0;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle span,
.menu-toggle span::before,
.menu-toggle span::after {
    display: block;
    width: 1.5rem;
    height: 2px;
    background-color: var(--text);
    transition: all 0.3s ease;
}

.menu-toggle span {
    position: relative;
}

.menu-toggle span::before,
.menu-toggle span::after {
    content: '';
    position: absolute;
    left: 0;
}

.menu-toggle span::before {
    top: -6px;
}

.menu-toggle span::after {
    top: 6px;
}

.menu-toggle.active span {
    background-color: transparent;
}

.menu-toggle.active span::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active span::after {
    transform: rotate(-45deg);
    top: 0;
}

@media (min-width: 768px) {
    .nav-desktop {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }
}

/* ==========================================
   HERO SECTION
   ========================================== */
#hero {
    padding: 5rem 0 10rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    pointer-events: none;
}

.hero-glow {
    position: absolute;
    width: 10rem;
    height: 10rem;
    border-radius: 50%;
    filter: blur(3rem);
}

.hero-glow-gold {
    top: 2.5rem;
    left: 2.5rem;
    background-color: var(--primary);
}

.hero-glow-red {
    bottom: 2.5rem;
    right: 2.5rem;
    background-color: var(--destructive);
}

.hero-content {
    position: relative;
    z-index: 10;
}

#hero h1 {
    font-size: 3.75rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.05em;
}

.hero-tagline {
    font-family: 'Lora', serif;
    font-style: italic;
    color: var(--text-muted);
    max-width: 48rem;
    margin: 0 auto 2.5rem;
    font-size: 1.125rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    #hero {
        padding: 10rem 0;
    }

    #hero h1 {
        font-size: 6rem;
    }
}

/* ==========================================
   SECTION STYLES
   ========================================== */
section {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1rem;
    letter-spacing: -0.05em;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.125rem;
    max-width: 48rem;
    margin: 0 auto;
}

@media (min-width: 768px) {
    section {
        padding: 8rem 0;
    }

    .section-header h2 {
        font-size: 3.75rem;
    }
}

/* ==========================================
   ARSENAL SECTION
   ========================================== */
#arsenal {
    background-color: var(--background-alt);
}

.arsenal-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .arsenal-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .arsenal-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.arsenal-card {
    background-color: var(--card);
    border-radius: var(--radius);
    border: 1px solid var(--border-gold);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

a.arsenal-card {
    text-decoration: none;
    color: inherit;
}

.arsenal-card:hover {
    border-color: var(--border-gold-hover);
}

.arsenal-card:hover h3 {
    color: var(--primary);
}

.card-header {
    padding: 0.75rem;
    text-align: center;
}

.pirate-name {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.card-image {
    position: relative;
    height: 8rem;
    background-size: cover;
    background-position: center;
}

.card-image-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(10, 10, 10, 0.2);
}

.card-content {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.card-content p {
    font-family: 'Lora', serif;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Treasure Block */
.treasure-title {
    text-align: center;
    margin: 5rem 0 2rem;
}

.treasure-title h2 {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: -0.05em;
}

@media (min-width: 768px) {
    .treasure-title h2 {
        font-size: 3.75rem;
    }
}

.treasure-block {
    background: linear-gradient(to right, var(--card), var(--background-alt));
    border-radius: var(--radius);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 2rem;
}

@media (min-width: 768px) {
    .treasure-block {
        padding: 3rem;
    }
}

.treasure-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .treasure-grid {
        grid-template-columns: auto 1fr auto;
    }
}

.treasure-image img {
    width: 10rem;
    height: 10rem;
    object-fit: contain;
    margin: 0 auto;
    display: block;
}

.treasure-content {
    text-align: center;
}

@media (min-width: 768px) {
    .treasure-content {
        text-align: left;
    }
}

.treasure-content p {
    font-family: 'Lora', serif;
    font-style: italic;
    color: var(--text-gray);
    font-size: 1.125rem;
    line-height: 1.8;
}

.treasure-cta {
    display: flex;
    justify-content: center;
}

@media (min-width: 768px) {
    .treasure-cta {
        justify-content: flex-end;
    }
}

/* ==========================================
   CASES SECTION
   ========================================== */
#cases {
    background-color: var(--background);
}

.case-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    border-radius: var(--radius);
    border: 2px solid var(--primary);
    background-color: transparent;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

.tab-btn.active {
    background-color: var(--primary);
    color: var(--background);
}

.case-slider {
    background-color: var(--card);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius);
    padding: 2rem;
}

@media (min-width: 768px) {
    .case-slider {
        padding: 3rem;
    }
}

.case-panel {
    display: none;
}

.case-panel.active {
    display: block;
}

.case-slide {
    display: none;
}

.case-slide.active {
    display: block;
}

.case-image {
    margin-bottom: 2rem;
}

.case-image img {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border-gold);
    object-fit: cover;
}

.case-chart {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 16rem;
    background: linear-gradient(to bottom, var(--background-alt), var(--card));
    border-radius: var(--radius);
    border: 1px solid var(--border-gold);
    padding: 1rem 1rem 3rem 1rem;
    margin-bottom: 2rem;
}

.chart-bar {
    width: 3rem;
    background-color: var(--primary);
    border-radius: 0.25rem 0.25rem 0 0;
    position: relative;
}

.chart-bar span {
    position: absolute;
    bottom: -2rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    margin-top: 0.5rem;
    white-space: nowrap;
}

.case-info {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .case-info {
        grid-template-columns: repeat(3, 1fr);
    }
}

.case-info-item h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.case-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.case-info-item p {
    color: var(--text-gray);
    font-size: 1.125rem;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.slider-btn {
    padding: 0.5rem 1.5rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    border-radius: var(--radius);
    border: 1px solid var(--primary);
    background-color: transparent;
    color: var(--primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-btn:hover {
    background-color: rgba(212, 175, 55, 0.1);
}

/* ==========================================
   STATS SECTION
   ========================================== */
#stats {
    padding: 5rem 0;
}

@media (min-width: 768px) {
    #stats {
        padding: 8rem 0;
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    text-align: center;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-item .stat-number {
    font-family: 'Poppins', system-ui, sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .stat-item .stat-number {
        font-size: 3rem;
    }
}

.stat-item .stat-label {
    font-family: 'Oswald', sans-serif;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

/* ==========================================
   CREW SECTION
   ========================================== */
#crew {
    background-color: var(--background);
}

.crew-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .crew-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.crew-card {
    text-align: center;
}

.crew-image {
    margin-bottom: 1.5rem;
    border: 2px solid var(--primary);
    padding: 1rem;
    border-radius: var(--radius);
    background: linear-gradient(to bottom, var(--card), var(--background-alt));
}

.crew-image img {
    width: 100%;
    height: auto;
    border-radius: calc(var(--radius) - 0.5rem);
}

.crew-card h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.crew-card p {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.crew-description {
    background-color: var(--card);
    padding: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-gold);
    max-width: 48rem;
    margin: 0 auto;
}

.crew-description p {
    color: var(--text-gray);
    text-align: center;
    line-height: 1.8;
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
#contact {
    background-color: var(--background-alt);
    text-align: center;
}

#contact h2 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 2rem;
    letter-spacing: -0.05em;
}

@media (min-width: 768px) {
    #contact h2 {
        font-size: 3.75rem;
    }
}

#contact p {
    color: var(--text-muted);
    max-width: 32rem;
    margin: 0 auto 3rem;
    font-size: 1.125rem;
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    text-align: center;
}

footer p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.lang-switcher {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.lang-link {
    font-family: 'Oswald', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    transition: color 0.3s ease;
}

.lang-link:hover {
    color: var(--primary);
}

.lang-link.active {
    color: var(--primary);
}

.lang-divider {
    color: var(--text-muted);
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.hidden {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
