/* ===================================
   FrontWars Website Styles
   Mobile-First Responsive Design
   =================================== */

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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --text-color: #ecf0f1;
    --text-dark: #2c3e50;
    --bg-light: #ecf0f1;
    --bg-dark: #1a252f;
    --border-color: #7f8c8d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.2);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

/* Layout: make footer stick to bottom when content is short */
html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color);
    padding: 0.6rem 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.site-logo a {
    color: var(--text-color);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
}

.main-nav a:hover {
    color: var(--warning-color);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    padding: 2rem 0;
    color: var(--text-color);
}

.iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-dark);
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.hero-caption {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.1rem;
    font-style: italic;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
    background-color: var(--bg-light);
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-weight: bold;
}

/* Table of Contents */
.table-of-contents {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    border-left: 4px solid var(--accent-color);
}

.table-of-contents h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.table-of-contents ul {
    list-style: none;
}

.table-of-contents li {
    margin: 0.75rem 0;
}

.table-of-contents a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.table-of-contents a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.table-of-contents a::before {
    content: "";
    margin-right: 0;
}

/* Top-level items use a round bullet; nested items have no symbol */
.table-of-contents > ul > li > a::before {
    content: "•";
    font-size: 1rem;
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.table-of-contents ul ul a::before {
    content: "";
    margin-right: 0;
}

/* Indentation for nested items in Table of Contents */
.table-of-contents ul ul {
    margin-top: 0.25rem;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--border-color);
}

.table-of-contents ul ul li {
    margin: 0.5rem 0;
}

.table-of-contents ul ul a {
    font-weight: 400;
}

/* Content Articles */
.content-article {
    background-color: white;
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.content-article h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-color);
}

.content-article h3 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-article h4 {
    color: var(--secondary-color);
    font-size: 1.2rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.content-article p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content-article ul,
.content-article ol {
    margin-left: 2rem;
    margin-bottom: 1.5rem;
}

.content-article li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.content-article strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin: 1.5rem 0;
    background-color: var(--bg-dark);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-caption {
    text-align: center;
    font-style: italic;
    color: var(--secondary-color);
    margin-top: 0.5rem;
}

/* Game Images */
.game-image {
    margin: 2rem 0;
    text-align: center;
}

.game-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.image-caption {
    margin-top: 0.75rem;
    font-style: italic;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

/* Duo images side-by-side */
.game-image-duo {
    margin: 2rem 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    align-items: start;
}

.game-image-duo figure {
    margin: 0;
    text-align: center;
}

.game-image-duo img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

/* Inline Interleaved Game Images */
.content-article .inline-game-image {
    margin: 1.5rem 0;
    text-align: center;
}

.content-article .inline-game-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: block;
    margin: 0 auto;
}

.content-article .inline-game-image figcaption {
    margin-top: 0.5rem;
    font-style: italic;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background-color: white;
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

tbody tr:hover {
    background-color: rgba(52, 73, 94, 0.05);
    transition: background-color 0.3s ease;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Pro Tips Section */
.pro-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.tip-box {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.05) 0%, rgba(52, 73, 94, 0.1) 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tip-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tip-box h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.tip-box p {
    margin-bottom: 0;
    line-height: 1.6;
    color: var(--text-dark);
}

/* FAQ Section */
.faq-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, rgba(236, 240, 241, 0.5) 0%, rgba(189, 195, 199, 0.3) 100%);
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background-color: white;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.faq-item:hover {
    box-shadow: var(--shadow-lg);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.25rem 1.5rem;
    background-color: white;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    transition: background-color 0.3s ease;
    position: relative;
    padding-right: 3rem;
}

.faq-question::after {
    content: '+';
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: var(--accent-color);
    transition: transform 0.3s ease;
}

.faq-question:hover {
    background-color: rgba(52, 73, 94, 0.05);
}

.faq-item.active .faq-question::after {
    content: '−';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(236, 240, 241, 0.5);
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 1.25rem 1.5rem;
    margin: 0;
    line-height: 1.7;
    color: var(--text-dark);
}

.faq-answer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.faq-answer a:hover {
    text-decoration: underline;
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--text-color);
    padding: 1.5rem 0 0.75rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-section h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-section p {
    color: rgba(236, 240, 241, 0.8);
    line-height: 1.6;
}

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

.footer-section li {
    margin-bottom: 0.5rem;
}

/* Footer: hide heading and lay out links horizontally */
.site-footer .footer-section h3 {
    display: none;
}

.site-footer .footer-section ul {
    display: flex;
    gap: 1.25rem;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
}

.site-footer .footer-section li {
    margin: 0;
}

.footer-section a {
    color: rgba(236, 240, 241, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--warning-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(236, 240, 241, 0.2);
    color: rgba(236, 240, 241, 0.7);
}

/* Page Content (for non-index pages) */
.page-content {
    flex: 1 0 auto;
    padding: 3rem 0;
}

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

.page-subtitle {
    text-align: center;
    color: var(--secondary-color);
    margin: 0 0 2rem;
}

/* Contact Form */
.contact-form-container {
    max-width: 700px;
    margin: 2rem auto;
}

.contact-form {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.submit-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, #c0392b 100%);
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 4px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--shadow);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:active {
    transform: translateY(0);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Contact Info Boxes */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.contact-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--accent-color);
}

.contact-item h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.contact-item p {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.contact-item a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

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

/* Policy Pages */
.policy-footer {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
    font-weight: 600;
    color: var(--primary-color);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        justify-content: center;
        gap: 0.5rem;
    }

    .main-nav a {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

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

    .content-article {
        padding: 1.5rem;
    }

    .content-article h2 {
        font-size: 1.6rem;
    }

    .content-article h3 {
        font-size: 1.3rem;
    }

    .game-image-duo {
        grid-template-columns: 1fr;
    }

    .pro-tips {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }
}

@media screen and (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }

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

    .game-image-duo {
        grid-template-columns: 1fr;
    }
}

@media screen and (min-width: 1025px) {
    .hero-section {
        padding: 3rem 0;
    }

    .content-section {
        padding: 4rem 0;
    }

    .faq-section {
        padding: 4rem 0;
    }
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .main-nav,
    .hero-section,
    .video-container {
        display: none;
    }

    body {
        color: black;
        background: white;
    }

    .content-article {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Accessibility */
.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;
}

/* Smooth transitions for all interactive elements */
a,
button,
input,
select,
textarea {
    transition: all 0.3s ease;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

