/* Color Variables */
:root {
    --primary: #400f16;
    --primary-dark: #300a10;
    --primary-light: #f5e8ea;
    --secondary: #d2a673;
    --secondary-dark: #b38a5a;
    --tertiary: #c2b39b;
    --tertiary-light: #e8e4db;
    --towing: #3d7e9a;
    --towing-dark: #2c5d72;
    --white: #FFFFFF;
    --off-white: #f9f9f9;
    --light-gray: #F2F2F3;
    --charcoal: #454545;
    
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif;
    line-height: 1.6;
    color: var(--charcoal);
    background-color: rgba(69, 69, 69, 0.2); /* Semi-transparent charcoal */
    background-image: url('images/canvas-texture.webp');
    background-repeat: repeat;
    background-size: 50px 50px;
    background-blend-mode: overlay; /* Changed to overlay for better texture visibility */
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-family: 'Lato', sans-serif;
    font-weight: 900;
    line-height: 1.3;
    color: var(--primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.3rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

address {
    font-style: normal;
    margin-bottom: 1rem;
}

/* Phone Bar */
.phone-bar {
    background-color: var(--primary);
    color: white;
    padding: 0.8rem 0;
    text-align: center;
    font-family: 'Lato', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}

.phone-link {
    color: var(--secondary);
    font-weight: 900;
}

.phone-bar .phone-link:hover {
    color: white;
}

/* Header Navigation */
.header-nav {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.header-nav a {
    color: white;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    transition: all 0.3s ease;
    background-color: var(--secondary);
}

.header-nav a:hover {
    background-color: var(--secondary-dark);
    box-shadow: var(--shadow-md);
}

.towing-link {
    background-color: var(--towing) !important;
}

.towing-link:hover {
    background-color: var(--towing-dark) !important;
}

.logo-section {
    background-color: rgba(242, 242, 243, 0.7); /* Semi-transparent light-gray */
    /* Canvas texture overlay on semi-transparent background */
    background-image: url('images/canvas-texture.webp');
    background-blend-mode: overlay;
    background-size: 50px 50px;
    padding: 2rem 0;
    text-align: center;
    /* Added subtle dividing line */
    border-bottom: 1px solid rgba(69, 69, 69, 0.2); /* Very subtle border using charcoal color */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Subtle shadow for depth */
}

.logo-container {
    max-width: 500px; /* Increased from 280px (approx 25% larger) */
    margin: 0 auto 1.5rem;
}

/* Logo with 3D effect */
.logo {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.25));
    transition: filter 0.3s ease;
}

/* Optional: Slightly enhance shadow on hover for interactive feel */
.logo-container:hover .logo {
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.3));
}

.logo-tagline {
    font-style: italic;
    margin-bottom: 1rem;
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-block;
    font-family: 'Lato', sans-serif;
    font-weight: bold;
    padding: 0.8rem 2rem;
    border-radius: 30px;
    transition: all 0.3s ease;
    text-align: center;
    margin: 0.5rem;
    box-shadow: var(--shadow-md);
}

.primary-btn {
    background-color: var(--secondary);
    color: white;
}

.primary-btn:hover {
    background-color: var(--secondary-dark);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.towing-btn {
    background-color: var(--towing);
    color: white;
}

.towing-btn:hover {
    background-color: var(--towing-dark);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Cards */
.card {
    background-color: white;
    /* Canvas texture overlay on white */
    background-image: url('images/canvas-texture.webp');
    background-blend-mode: overlay;
    background-size: 50px 50px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.card-header {
    background-color: var(--primary);
    /* Canvas texture with multiply blend for header */
    background-image: url('images/canvas-texture.webp');
    background-blend-mode: multiply;
    background-size: 50px 50px;
    color: white;
    padding: 1rem 1.5rem;
    text-align: center;
}

.card-header h2 {
    color: white;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Main Content */
main {
    padding: 2rem 0;
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.center-smiley {
    grid-column: 2;
}

.service-item {
    background-color: white;
    /* Canvas texture overlay */
    background-image: url('images/canvas-texture.webp');
    background-blend-mode: overlay;
    background-size: 50px 50px;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary);
}

/* Removed translateY movement but kept shadow enhancement */
.service-item:hover {
    box-shadow: var(--shadow-md);
}

/* Service Icon Styles - Fixed Version */
.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1rem;
    background-image: none !important;
    background-color: var(--primary-light) !important;
    position: relative;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remove texture overlay pseudo-element */
.service-icon::before {
    content: none;
}

/* Reset backgrounds WITHOUT affecting the circle background */
.icon-alignment, 
.icon-battery, 
.icon-brake, 
.icon-diagnostics, 
.icon-emissions, 
.icon-oil {
    background-image: none !important;
}

/* Consistent positioning for all icon elements */
.icon-alignment::before, .icon-alignment::after,
.icon-battery::before, .icon-battery::after,
.icon-diagnostics::before, .icon-diagnostics::after,
.icon-emissions::before, .icon-emissions::before,
.icon-oil::before, .icon-oil::after {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

/* Alignment Icon */
.icon-alignment::before {
    content: "";
    width: 40px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 4px;
}

.icon-alignment::after {
    content: "";
    width: 8px;
    height: 40px;
    background-color: var(--primary);
    border-radius: 4px;
}

/* Battery Icon */
.icon-battery::before {
    content: "";
    width: 36px;
    height: 20px;
    background-color: var(--primary);
    border-radius: 3px;
}

.icon-battery::after {
    content: "";
    width: 8px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 2px 2px 0 0;
    transform: translate(-50%, calc(-50% - 10px));
}

/* Brake Icon - Fixed for proper layering */
.icon-brake {
    position: relative;
    overflow: visible;
}

.icon-brake::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    border-radius: 50%;
    z-index: 1;
}

.icon-brake::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    background-color: var(--primary-light);
    background-image: none !important;
    border-radius: 50%;
    z-index: 2;
}

/* Diagnostics Icon - Updated with primary-light fill */
.icon-diagnostics::before {
    content: "";
    width: 35px;
    height: 20px;
    background-color: var(--primary-light);
    border: 4px solid var(--primary);
    border-radius: 5px;
    box-sizing: border-box;
}

.icon-diagnostics::after {
    content: "";
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border-radius: 50%;
    transform: translate(8px, 5px);
}

/* Emissions Icon - Updated with primary-light fill */
.icon-emissions::before {
    content: "";
    width: 25px;
    height: 35px;
    background-color: var(--primary-light);
    border: 4px solid var(--primary);
    border-radius: 15px 15px 5px 5px;
    box-sizing: border-box;
}

/* Oil Icon */
.icon-oil::before {
    content: "";
    width: 25px;
    height: 35px;
    background-color: var(--primary);
    border-radius: 3px;
}

.icon-oil::after {
    content: "";
    width: 15px;
    height: 8px;
    background-color: var(--primary);
    border-radius: 4px;
    transform: translate(-50%, calc(-50% - 17px));
}

/* Smiley Face Icon */
.icon-smiley {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-light);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Smiley Eyes */
.icon-smiley::before,
.icon-smiley::after {
    content: "";
    position: absolute;
    background-color: var(--primary);
    border-radius: 50%;
    width: 10px;
    height: 10px;
    top: 20px;
}

.icon-smiley::before {
    left: 20px;
}

.icon-smiley::after {
    right: 20px;
}

/* Smiley Mouth */
.icon-smiley .smiley-mouth {
    position: absolute;
    width: 30px;
    height: 15px;
    border-radius: 0 0 15px 15px;
    background-color: transparent;
    border: 3px solid var(--primary);
    border-top: none;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Map Container */
.map-container {
    height: auto; /* Changed from 100% to auto */
    min-height: 300px;
    border-radius: 0 0 8px 8px; /* Proper border radius syntax */
    overflow: visible; /* Changed from hidden to visible */
    padding-bottom: 16px; /* Added padding to show map controls */
}

.map-container iframe {
    width: 100%;
    height: 450px; /* Increased from 350px to 450px to show full controls */
    border: none;
    border-radius: 0;
    display: block;
    margin-bottom: 0; /* Ensure no gap at bottom */
}

/* Info Box */
.info-box {
    background-color: var(--off-white);
    /* Canvas texture overlay */
    background-image: url('images/canvas-texture.webp');
    background-blend-mode: overlay;
    background-size: 50px 50px;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
}

.info-label {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-family: 'Lato', sans-serif;
}

/* Towing Section */
.towing-section {
    background-color: var(--light-gray);
    /* Canvas texture overlay */
    background-image: url('images/canvas-texture.webp');
    background-blend-mode: overlay;
    background-size: 50px 50px;
    border-radius: 10px;
    padding: 2rem;
    margin: 3rem 0;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.towing-section h2 {
    margin-bottom: 1.5rem;
}

.towing-graphic {
    width: 100px;
    height: 60px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.towing-car {
    position: absolute;
    width: 60px;
    height: 20px;
    background-color: var(--primary);
    bottom: 0;
    left: 15px;
    border-radius: 5px;
}

.towing-car::before {
    content: "";
    position: absolute;
    width: 30px;
    height: 15px;
    background-color: var(--primary);
    top: -15px;
    left: 15px;
    border-radius: 30px 30px 0 0;
}

.towing-car::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--tertiary);
    bottom: 3px;
    border-radius: 50%;
    box-shadow: 40px 0 0 0 var(--tertiary);
}

.towing-truck {
    position: absolute;
    width: 25px;
    height: 40px;
    background-color: var(--towing);
    bottom: 0;
    right: 0;
    border-radius: 5px 5px 0 0;
}

.towing-truck::before {
    content: "";
    position: absolute;
    width: 35px;
    height: 15px;
    background-color: var(--towing);
    bottom: 0;
    right: 0;
    border-radius: 5px 0 0 0;
}

.towing-truck::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--tertiary);
    bottom: 3px;
    left: 3px;
    border-radius: 50%;
}

.towing-note {
    font-style: italic;
    max-width: 600px;
    margin: 1rem auto;
    padding: 1rem;
    background-color: var(--towing);
    color: white;
    /* Canvas texture overlay */
    background-image: url('images/canvas-texture.webp');
    background-blend-mode: multiply;
    background-size: 50px 50px;
    border-radius: 8px;
}

/* Coming Soon */
.coming-soon {
    background-color: var(--primary);
    /* Canvas texture with multiply blend */
    background-image: url('images/canvas-texture.webp');
    background-blend-mode: multiply;
    background-size: 100px 100px;
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 3rem;
    text-align: center;
}

.coming-soon h2 {
    color: white;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    /* Canvas texture with multiply blend */
    background-image: url('images/canvas-texture.webp');
    background-blend-mode: multiply;
    background-size: 50px 50px;
    color: white;
    padding: 2rem 0 1.5rem;
    margin-top: 3rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
}

.footer-logo {
    text-align: center;
}

.footer-logo img {
    max-width: 150px; /* Smaller than header logo */
    opacity: 0.9; /* Slightly transparent for elegant look */
}

footer .phone-link {
    color: var(--secondary);
}

footer .phone-link:hover {
    color: white;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* Make footer headings white */
footer h2 {
    color: white !important;
}

/* Responsive adjustments for service cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/* Smallest screens (iPhone SE, etc.) */
@media (max-width: 374px) {
    .services-grid {
        grid-template-columns: 1fr; /* Single column */
        gap: 1rem;
    }
    
    .service-item {
        padding: 1rem;
    }
    
    .center-smiley {
        grid-column: auto; /* Reset the center positioning on single column */
    }
}

/* Medium small screens (iPhone 12, etc.) */
@media (min-width: 375px) and (max-width: 767px) {
    .services-grid {
        gap: 0.8rem; /* Smaller gap */
    }
    
    .service-item {
        padding: 1rem; /* Smaller padding */
    }
    
    .service-item h3 {
        font-size: 1.1rem; /* Smaller text */
    }
}

/* Tablets and larger */
@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr 1fr;
        text-align: left;
        align-items: center; /* Vertically center all columns */
    }
    
    .footer-hours {
        text-align: right;
    }
    
    .two-column {
        grid-template-columns: 1fr 1fr;
    }
}