/* Ontario Foundations - Professional Foundation Repair Website */
/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette - Professional Blue/Gray Theme */
    --primary-color: #1e3a8a;
    --primary-dark: #1e293b;
    --primary-light: #3b82f6;
    --secondary-color: #f59e0b;
    --accent-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', 'Inter', sans-serif;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-max: 1200px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--bg-white);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-dark);
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

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

a:hover {
    color: var(--primary-light);
}

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

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--bg-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-normal);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: var(--container-max);
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
}

.logo span {
    color: var(--secondary-color);
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 0;
    transition: var(--transition-fast);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition-normal);
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition-fast);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    background-image: url('https://images.pexels.com/photos/2219024/pexels-photo-2219024.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--bg-white);
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    color: var(--bg-white);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero-text p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Lead Form */
.lead-form {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease 0.3s backwards;
}

.lead-form h3 {
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition-fast);
    background-color: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error .error-message {
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 58, 138, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--bg-white);
}

.btn-secondary:hover {
    background-color: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

/* Services Section */
.services-section {
    padding: var(--section-padding);
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-light);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: var(--bg-white);
    overflow: hidden;
}

.service-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    margin-bottom: 1.5rem;
}

.service-card .btn {
    margin-top: auto;
}

/* Features Section */
.features-section {
    padding: var(--section-padding);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-item {
    text-align: center;
    padding: 2rem;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.75rem;
    color: var(--primary-color);
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--bg-white);
    padding: 80px 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--bg-white);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* Blog Grid */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: var(--transition-normal);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.blog-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.blog-excerpt {
    color: var(--text-light);
    margin-bottom: 1rem;
}

/* FAQ Section */
.faq-section {
    padding: var(--section-padding);
    background-color: var(--bg-light);
}

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

.faq-item {
    background: var(--bg-white);
    margin-bottom: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

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

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

.faq-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: var(--transition-normal);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

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

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

.faq-answer-content {
    padding: 0 1.5rem 1.5rem;
    color: var(--text-light);
}

/* Map Container */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 2rem 0;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.9);
    padding: 60px 0 30px;
}

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

.footer-section h4 {
    color: var(--bg-white);
    margin-bottom: 1.5rem;
}

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--bg-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.6);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .container {
        padding: 0 15px;
        overflow-x: hidden;
    }
    
    body {
        overflow-x: hidden;
    }
    
    .header-container {
        flex-wrap: wrap;
        padding: 0.75rem 15px;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    nav {
        flex-basis: 100%;
        max-height: 0;
        overflow: hidden;
        transition: var(--transition-normal);
    }
    
    nav.active {
        max-height: 500px;
    }
    
    nav ul {
        flex-direction: column;
        padding: 1rem 0;
        gap: 0;
    }
    
    nav a {
        display: block;
        padding: 0.75rem 0;
    }
    
    .hero {
        padding: 40px 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .stat-item {
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    .lead-form {
        padding: 1.5rem;
        margin: 0 -5px;
    }
    
    .lead-form h3 {
        font-size: 1.25rem;
    }
    
    .services-grid,
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1.5rem 1rem;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .cta-section {
        padding: 50px 0;
    }
    
    .cta-section h2 {
        font-size: 1.5rem;
    }
    
    .cta-section p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .btn-large {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 0.95rem;
    }
    
    .faq-answer-content {
        padding: 0 1rem 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-section ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem 1rem;
    }
    
    .footer-section ul li {
        margin-bottom: 0;
    }
    
    footer {
        padding: 40px 0 20px;
    }
    
    .map-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.35rem; }
    
    .container {
        padding: 0 12px;
    }
    
    .hero {
        padding: 30px 0;
    }
    
    .hero-text h1 {
        font-size: 1.5rem;
    }
    
    .hero-text p {
        font-size: 0.95rem;
    }
    
    .stat-item {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .lead-form {
        padding: 1.25rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.75rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        width: 100%;
    }
    
    .service-card {
        padding: 1.25rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-card {
        margin: 0 -5px;
    }
}

/* Hero CTA Box */
.hero-cta-box {
    text-align: center;
}

.hero-cta-box h3 {
    font-size: 1.25rem !important;
}

.hero-cta-box p {
    font-size: 0.95rem;
}

@media (max-width: 768px) {
    .hero-cta-box {
        padding: 1rem !important;
        margin-top: 1.5rem !important;
    }
    
    .hero-cta-box h3 {
        font-size: 1.1rem !important;
    }
    
    .hero-cta-box p {
        font-size: 0.9rem !important;
    }
    
    .hero-cta-box .btn {
        width: 100%;
        padding: 0.75rem 1rem !important;
        font-size: 0.95rem !important;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 1rem 0;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumbs ol {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
}

.breadcrumbs li {
    display: flex;
    align-items: center;
    color: var(--text-light);
}

.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin-left: 0.5rem;
    color: var(--text-light);
    opacity: 0.5;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.breadcrumbs li[aria-current="page"] {
    color: var(--text-dark);
    font-weight: 500;
}

/* Internal Links Section */
.internal-links {
    background-color: var(--bg-light);
    padding: 2rem;
    border-radius: 8px;
    margin: 3rem 0;
}

.internal-links h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.internal-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
}

.internal-links li {
    padding: 0.5rem 0;
}

.internal-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
}

.internal-links a::before {
    content: '→';
    margin-right: 0.5rem;
    transition: var(--transition-fast);
}

.internal-links a:hover {
    color: var(--primary-light);
    padding-left: 0.25rem;
}

.internal-links a:hover::before {
    margin-right: 0.75rem;
}

/* Related Services Section */
.related-services {
    padding: 60px 0;
}

.related-services h2 {
    text-align: center;
    margin-bottom: 3rem;
}

/* Performance: Lazy Loading Images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Skip to content link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.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; }
.hidden { display: none; }

/* Responsive: Breadcrumbs */
@media (max-width: 768px) {
    .breadcrumbs {
        font-size: 0.85rem;
    }
    
    .internal-links ul {
        grid-template-columns: 1fr;
    }
}
