/* ============================================
   Sandwich Delivery Infrastructure - Main Styles
   Map-Based Visual Theme
   ============================================ */

/* CSS Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Color Palette */
    --bg-primary: #f5f0e6;
    --bg-secondary: #ebe5d8;
    --bg-card: #ffffff;
    --accent-green: #4a7c59;
    --accent-green-light: #6b9b7a;
    --accent-green-dark: #3a5f47;
    --text-primary: #2d3436;
    --text-secondary: #636e72;
    --text-muted: #8c8c8c;
    --route-line: #e17055;
    --marker-blue: #0984e3;
    --border-color: #d4cfc3;
    
    /* Typography */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Georgia', 'Times New Roman', serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2.5rem;
    --spacing-xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    font-size: 16px;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

a {
    color: var(--accent-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-green-dark);
}

/* ============================================
   Layout Components
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-xl) 0;
}

.section-light {
    background-color: var(--bg-card);
}

.section-map {
    background-color: var(--bg-secondary);
    position: relative;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    background-color: var(--bg-card);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--accent-green);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background-color: var(--accent-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo-text span {
    color: var(--accent-green);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent-green);
    background-color: var(--bg-secondary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--bg-card);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-md);
        display: none;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        border-bottom: 1px solid var(--border-color);
    }
    
    .nav-links li:last-child {
        border-bottom: none;
    }
    
    .nav-links a {
        display: block;
        padding: var(--spacing-sm);
    }
}

/* ============================================
   Hero Section
   ============================================ */

.hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(74, 124, 89, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(225, 112, 85, 0.08) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: var(--spacing-lg);
}

.hero-visual {
    margin-top: var(--spacing-lg);
}

/* Map Illustration */
.map-illustration {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg);
    position: relative;
    overflow: hidden;
}

.map-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
    margin-bottom: var(--spacing-md);
}

.map-cell {
    aspect-ratio: 1;
    background-color: var(--bg-secondary);
    border-radius: 2px;
    position: relative;
}

.map-cell.road {
    background-color: #d5d5d5;
}

.map-cell.building {
    background-color: #c8d4c8;
}

.map-cell.park {
    background-color: #b8d4b8;
}

.map-cell.water {
    background-color: #b8d4d8;
}

/* Route Lines */
.route-line {
    position: absolute;
    background-color: var(--route-line);
    border-radius: 2px;
}

.route-line.horizontal {
    height: 4px;
    width: 100%;
}

.route-line.vertical {
    width: 4px;
    height: 100%;
}

/* Location Markers */
.marker {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.marker.origin {
    background-color: var(--accent-green);
}

.marker.destination {
    background-color: var(--marker-blue);
}

.marker.delivery {
    background-color: var(--route-line);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.map-legend {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.green { background-color: var(--accent-green); }
.legend-dot.blue { background-color: var(--marker-blue); }
.legend-dot.orange { background-color: var(--route-line); }

/* ============================================
   Cards & Content Boxes
   ============================================ */

.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-lg);
    transition: box-shadow var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.card-icon svg {
    width: 30px;
    height: 30px;
    fill: var(--accent-green);
}

.card h3 {
    margin-bottom: var(--spacing-xs);
}

.card p {
    font-size: 0.95rem;
}

/* Info Box */
.info-box {
    background-color: var(--bg-card);
    border-left: 4px solid var(--accent-green);
    padding: var(--spacing-md);
    margin: var(--spacing-md) 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.info-box.warning {
    border-left-color: #f39c12;
    background-color: #fefcf3;
}

.info-box.info {
    border-left-color: var(--marker-blue);
    background-color: #f0f7fc;
}

/* ============================================
   Grid Layouts
   ============================================ */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-md);
}

@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Page Header
   ============================================ */

.page-header {
    background-color: var(--bg-card);
    padding: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: var(--spacing-lg);
}

.breadcrumb {
    display: flex;
    gap: var(--spacing-xs);
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--accent-green);
}

.breadcrumb span {
    color: var(--text-muted);
}

/* ============================================
   Content Sections
   ============================================ */

.content-section {
    margin-bottom: var(--spacing-xl);
}

.content-section h2 {
    padding-bottom: var(--spacing-xs);
    border-bottom: 2px solid var(--accent-green);
    display: inline-block;
}

.content-section h3 {
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-sm);
}

.content-section ul, .content-section ol {
    margin-left: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}

.content-section li {
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
}

/* Comparison Table */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--spacing-md) 0;
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.comparison-table th,
.comparison-table td {
    padding: var(--spacing-sm) var(--spacing-md);
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.comparison-table th {
    background-color: var(--accent-green);
    color: white;
    font-weight: 600;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover td {
    background-color: var(--bg-secondary);
}

/* ============================================
   FAQ Section
   ============================================ */

.faq-item {
    background-color: var(--bg-card);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq-question {
    padding: var(--spacing-md);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--text-primary);
    transition: background-color var(--transition-fast);
}

.faq-question:hover {
    background-color: var(--bg-secondary);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent-green);
    transition: transform var(--transition-fast);
}

.faq-item.open .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 var(--spacing-md);
    max-height: 0;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-item.open .faq-answer {
    padding: var(--spacing-md);
    max-height: 500px;
    border-top: 1px solid var(--border-color);
}

/* ============================================
   Contact Section
   ============================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

.contact-info {
    background-color: var(--bg-card);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.contact-item {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
}

.contact-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background-color: var(--bg-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-icon svg {
    width: 24px;
    height: 24px;
    fill: var(--accent-green);
}

.contact-details h4 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.contact-details p {
    font-size: 0.95rem;
    margin: 0;
}

.contact-details a {
    font-size: 0.95rem;
}

/* Map Embed Placeholder */
.map-container {
    background-color: var(--bg-secondary);
    border-radius: var(--radius-md);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.map-container::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(74, 124, 89, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(74, 124, 89, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
}

.map-container .marker {
    position: relative;
    width: 40px;
    height: 40px;
    font-size: 16px;
}

/* ============================================
   Footer
   ============================================ */

.footer {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand {
    margin-bottom: var(--spacing-sm);
}

.footer-brand h3 {
    color: var(--bg-primary);
    font-size: 1.25rem;
}

.footer-brand span {
    color: var(--accent-green-light);
}

.footer-brand p {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.footer h4 {
    color: var(--bg-primary);
    font-size: 1rem;
    margin-bottom: var(--spacing-sm);
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: var(--spacing-xs);
}

.footer ul a {
    color: #a0a0a0;
    font-size: 0.9rem;
    transition: color var(--transition-fast);
}

.footer ul a:hover {
    color: var(--accent-green-light);
}

.footer-bottom {
    padding-top: var(--spacing-md);
    border-top: 1px solid #3d3d3d;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.footer-bottom p {
    color: #a0a0a0;
    font-size: 0.85rem;
    margin: 0;
}

.footer-legal {
    display: flex;
    gap: var(--spacing-md);
}

.footer-legal a {
    color: #a0a0a0;
    font-size: 0.85rem;
}

/* ============================================
   Disclaimer Banner
   ============================================ */

.disclaimer {
    background-color: #fef9e7;
    border: 1px solid #f39c12;
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.disclaimer h4 {
    color: #d68910;
    margin-bottom: var(--spacing-xs);
}

.disclaimer p {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-secondary);
}

/* ============================================
   Utility Classes
   ============================================ */

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

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.hidden { display: none; }
.visible { display: block; }

/* Print Styles */
@media print {
    .navbar, .footer, .nav-toggle {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .card, .container {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--accent-green);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Focus Styles */
a:focus, button:focus {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

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