/* Fifazine - SEO-Optimized Static Website */
/* Mobile-first, performance-focused design */

/* ============================================
   RESET & BASE STYLES
   ============================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    font-size: 16px;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    margin-bottom: 0.5em;
    margin-top: 1em;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    color: #1a1a1a;
}

h2 {
    font-size: 2rem;
    color: #222;
}

h3 {
    font-size: 1.5rem;
    color: #333;
}

h4 {
    font-size: 1.25rem;
    color: #444;
}

h5 {
    font-size: 1.1rem;
    color: #555;
}

h6 {
    font-size: 1rem;
    color: #666;
}

p {
    margin-bottom: 1em;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0052a3;
    text-decoration: underline;
}

strong {
    font-weight: 600;
}

em {
    font-style: italic;
}

blockquote {
    border-left: 4px solid #0066cc;
    padding-left: 1em;
    margin: 1em 0;
    color: #666;
    font-style: italic;
}

code {
    background-color: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
    font-family: "Courier New", monospace;
    font-size: 0.9em;
}

pre {
    background-color: #f5f5f5;
    padding: 1em;
    border-radius: 4px;
    overflow-x: auto;
    margin: 1em 0;
}

pre code {
    background: none;
    padding: 0;
}

/* ============================================
   LISTS
   ============================================ */

ul, ol {
    margin: 1em 0 1em 2em;
}

li {
    margin-bottom: 0.5em;
}

/* ============================================
   IMAGES
   ============================================ */

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

figure {
    margin: 1.5em 0;
    text-align: center;
}

figcaption {
    font-size: 0.9em;
    color: #666;
    margin-top: 0.5em;
}

/* ============================================
   TABLES
   ============================================ */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}

th, td {
    border: 1px solid #ddd;
    padding: 0.75em;
    text-align: left;
}

th {
    background-color: #f5f5f5;
    font-weight: 600;
}

tr:nth-child(even) {
    background-color: #fafafa;
}

/* ============================================
   LAYOUT
   ============================================ */

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

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
    background-color: #1a1a1a;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
}

.logo:hover {
    color: #0066cc;
}

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

nav a {
    display: block;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

nav a:hover {
    background-color: #0066cc;
    color: white;
    text-decoration: none;
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #333 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    color: #ddd;
}

.hero-image {
    margin-top: 2rem;
    border-radius: 8px;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: auto;
}

/* ============================================
   MAIN CONTENT
   ============================================ */

main {
    padding: 2rem 0;
    min-height: 60vh;
}

article {
    margin-bottom: 2rem;
}

article > h1 {
    margin-top: 0;
}

.article-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.featured-image {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: auto;
}

/* ============================================
   SECTIONS & CARDS
   ============================================ */

.section {
    margin: 2rem 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: white;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

.card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card-title a {
    color: #333;
}

.card-title a:hover {
    color: #0066cc;
}

.card-excerpt {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.card-link {
    display: inline-block;
    margin-top: 1rem;
    color: #0066cc;
    font-weight: 500;
}

.card-link:hover {
    text-decoration: underline;
}

/* ============================================
   BREADCRUMBS
   ============================================ */

.breadcrumbs {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1.5rem;
    padding: 1rem 0;
}

.breadcrumbs a {
    color: #0066cc;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 0.5rem;
}

/* ============================================
   FAQ SECTION
   ============================================ */

.faq-item {
    margin: 1.5rem 0;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.faq-question {
    background-color: #f5f5f5;
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question:hover {
    background-color: #efefef;
}

.faq-toggle {
    font-size: 1.2rem;
}

.faq-answer {
    padding: 1rem;
    display: none;
    color: #555;
    line-height: 1.6;
}

.faq-answer.active {
    display: block;
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.sidebar h3 {
    margin-top: 0;
}

.sidebar ul {
    list-style: none;
    margin: 0;
}

.sidebar li {
    margin-bottom: 0.75rem;
}

.sidebar a {
    color: #0066cc;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
    background-color: #1a1a1a;
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

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

.footer-section h4 {
    color: white;
    margin-top: 0;
}

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

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

.footer-section a {
    color: #ccc;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: #0066cc;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 1.5rem;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #0066cc;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.btn:hover {
    background-color: #0052a3;
    text-decoration: none;
    color: white;
}

.btn-secondary {
    background-color: #666;
}

.btn-secondary:hover {
    background-color: #555;
}

/* ============================================
   FORMS
   ============================================ */

form {
    margin: 2rem 0;
}

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

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* ============================================
   UTILITIES
   ============================================ */

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

.text-right {
    text-align: right;
}

.text-muted {
    color: #666;
}

.text-small {
    font-size: 0.9rem;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
    }

    nav a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid #333;
    }

    .menu-toggle {
        display: block;
    }

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

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

    main {
        padding: 1rem 0;
    }

    .hero {
        padding: 2rem 0;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.25rem;
    }

    h3 {
        font-size: 1.1rem;
    }

    .container {
        padding: 0 0.75rem;
    }

    nav a {
        padding: 0.5rem 0.75rem;
    }

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

    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.5rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }

    h1, h2, h3, h4, h5, h6 {
        color: #f0f0f0;
    }

    a {
        color: #66b3ff;
    }

    a:hover {
        color: #99ccff;
    }

    code {
        background-color: #333;
        color: #e0e0e0;
    }

    pre {
        background-color: #2a2a2a;
        color: #e0e0e0;
    }

    th, td {
        border-color: #444;
    }

    th {
        background-color: #2a2a2a;
    }

    tr:nth-child(even) {
        background-color: #222;
    }

    .card {
        background: #222;
        border-color: #333;
    }

    .sidebar {
        background-color: #222;
    }

    .faq-question {
        background-color: #2a2a2a;
    }

    .faq-question:hover {
        background-color: #333;
    }

    input[type="text"],
    input[type="email"],
    input[type="url"],
    input[type="tel"],
    textarea,
    select {
        background-color: #2a2a2a;
        color: #e0e0e0;
        border-color: #444;
    }
}
