/*
Theme Name: Traffic Alerts SA Theme
Theme URI: https://trafficalerts.co.za
Author: SA Trucker / Traffic Alerts SA
Description: Modern responsive landing theme for Traffic Alerts South Africa, with live traffic feed integration.
Version: 1.0.0
Text Domain: trafficalerts
*/

/* Reset and Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #D7263D;
    --color-secondary: #1B263B;
    --color-accent: #F5A623;
    --color-background: #F5F7FA;
    --color-white: #FFFFFF;
    --color-text: #333333;
    --color-text-muted: #666666;
    --color-border: #E0E0E0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: opacity 0.2s;
}

a:hover {
    opacity: 0.8;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-wide {
    max-width: 1400px;
}

/* Utility Classes - Spacing */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-12 { margin-top: 3rem; }
.mt-16 { margin-top: 4rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }

.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }

.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }

/* Utility Classes - Flexbox */
.flex { display: flex; }
.flex-row { flex-direction: row; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Utility Classes - Typography */
.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }

.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.text-white { color: var(--color-white); }

/* Utility Classes - Grid */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive grid classes - stack on mobile */
@media (min-width: 768px) {
    .grid-cols-2-md { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3-md { grid-template-columns: repeat(3, 1fr); }
    .grid-cols-4-md { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
    .grid-cols-2-lg { grid-template-columns: repeat(2, 1fr); }
    .grid-cols-3-lg { grid-template-columns: repeat(3, 1fr); }
    .grid-cols-4-lg { grid-template-columns: repeat(4, 1fr); }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: #B91E32;
    opacity: 1;
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: #0F1626;
    opacity: 1;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: var(--color-white);
    opacity: 1;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Cards */
.card {
    background-color: var(--color-white);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.badge-accent {
    background-color: var(--color-accent);
    color: var(--color-white);
}

.badge-secondary {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

/* Header Styles */
.site-header {
    background-color: var(--color-white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-secondary);
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-navigation a {
    color: var(--color-text);
    font-weight: 500;
}

.main-navigation a:hover {
    color: var(--color-primary);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-secondary);
}

.mobile-menu {
    display: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    color: var(--color-white);
    padding: 4rem 0;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
    }
}

.hero-heading {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subheading {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.phone-mockup {
    background-color: var(--color-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Section Styles */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-secondary);
}

.section-subtitle {
    font-size: 1.125rem;
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Step Cards */
.step-card {
    text-align: center;
    padding: 2rem;
}

.step-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background-color: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    padding: 1.5rem;
}

.feature-item h3 {
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}

/* Alert Feed */
.alert-card {
    background-color: var(--color-white);
    border-left: 4px solid var(--color-primary);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.alert-location {
    font-weight: 600;
    color: var(--color-secondary);
}

.alert-province {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.alert-time {
    color: var(--color-text-muted);
    font-size: 0.875rem;
}

.alert-description {
    color: var(--color-text);
    margin-top: 0.5rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.375rem;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Footer */
.site-footer {
    background-color: var(--color-secondary);
    color: var(--color-white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--color-white);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--color-white);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.social-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.social-icons a:hover {
    background-color: var(--color-primary);
}

/* Screen reader text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
    }

    .mobile-menu.active {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }

    .mobile-menu ul {
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-menu a {
        display: block;
        padding: 0.75rem;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-heading {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4,
    .grid-cols-2-md,
    .grid-cols-3-md,
    .grid-cols-4-md,
    .grid-cols-2-lg,
    .grid-cols-3-lg,
    .grid-cols-4-lg {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }
}

/* Gutenberg Support */
.wp-block-group {
    margin-bottom: 2rem;
}

.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    max-width: 100%;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

.wp-block-group__inner-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

