/* Enhanced CSS for Midland Fire Direct with SVG Logo Support */
body { 
    font-family: 'Inter', sans-serif; 
    margin: 0; 
    line-height: 1.6; 
    color: #333; 
    background: #fff; 
}

.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 20px; 
}

/* Header Styles */
.header { 
    background: #fff; 
    border-bottom: 1px solid #eee; 
    padding: 10px 0; 
    position: sticky;
    top: 0;
    z-index: 100;
}

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

/* SVG Logo Styling */
.logo-section .logo { 
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.main-nav { 
    display: flex;
    gap: 10px;
}

.main-nav a { 
    margin: 0 10px; 
    text-decoration: none; 
    color: #333; 
    font-weight: 500; 
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active { 
    color: #b30004; 
    background: rgba(179, 0, 4, 0.1);
}

.header-cta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.phone-number {
    font-weight: 600;
    color: #b30004;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: all 0.3s ease;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 20px 0;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.mobile-nav.active {
    transform: translateX(0);
}

.mobile-nav a {
    padding: 12px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav a:hover {
    color: #b30004;
    background: rgba(179, 0, 4, 0.05);
}

/* Enhanced Mobile Menu Animation */
.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Buttons */
.btn { 
    display: inline-block; 
    padding: 12px 24px; 
    border-radius: 6px; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.btn-header {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-primary { 
    background: #b30004; 
    color: #fff; 
    border-color: #b30004;
}

.btn-primary:hover { 
    background: #9a0003; 
    border-color: #9a0003;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(179, 0, 4, 0.3);
}

.btn-outline { 
    border: 2px solid #b30004; 
    color: #b30004; 
    background: transparent;
}

.btn-outline:hover { 
    background: #b30004; 
    color: #fff; 
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero { 
    text-align: center; 
    padding: 120px 20px; 
    background: linear-gradient(135deg, #f8f9fb 0%, #e8f0fe 100%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(179, 0, 4, 0.1);
    color: #b30004;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero-title { 
    font-size: 3rem; 
    margin-bottom: 20px; 
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #666;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 40px 0;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #b30004;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-top: 5px;
}

.hero-actions { 
    margin-top: 40px; 
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Overview Section */
.overview-section {
    padding: 80px 20px;
    background: #fff;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.overview-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); 
    gap: 30px;
}

.overview-card {
    background: #f9f9f9; 
    padding: 30px 25px; 
    border-radius: 12px; 
    text-align: center; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(179, 0, 4, 0.1);
    animation: fadeIn 0.6s ease-out;
}

.overview-card:nth-child(1) { animation-delay: 0.1s; }
.overview-card:nth-child(2) { animation-delay: 0.2s; }
.overview-card:nth-child(3) { animation-delay: 0.3s; }
.overview-card:nth-child(4) { animation-delay: 0.4s; }

.overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: rgba(179, 0, 4, 0.3);
}

.overview-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.overview-card h3 {
    color: #1a1a1a;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.overview-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-link {
    color: #b30004;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
}

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

/* Featured Products */
.featured-products {
    padding: 80px 20px;
    background: #f8f9fb;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.featured-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.featured-item:hover {
    transform: translateY(-5px);
}

.featured-image {
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.featured-info {
    padding: 25px;
}

.featured-info h4 {
    font-size: 1.3rem;
    color: #1a1a1a;
    margin-bottom: 10px;
    font-weight: 600;
}

.featured-info p {
    color: #666;
    line-height: 1.6;
}

.featured-cta {
    text-align: center;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Product Grid */
.products-section {
    padding: 80px 20px;
    background: #fff;
}

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

.product-card { 
    background: #fff; 
    border-radius: 12px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-image {
    height: 200px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 25px;
    text-align: center;
}

.product-info h3 {
    color: #1a1a1a;
    font-size: 1.3rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.product-info p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Services Grid */
.services-section {
    padding: 80px 20px;
    background: #fff;
}

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

.service-item { 
    background: #f9f9f9; 
    padding: 30px 25px; 
    border-radius: 12px; 
    text-align: center; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
}

/* Testimonials */
.home-testimonials {
    padding: 80px 20px;
    background: #fff;
}

.testimonials-preview {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: center;
}

.testimonial-highlight blockquote {
    font-size: 1.4rem;
    line-height: 1.6;
    color: #1a1a1a;
    font-style: italic;
    margin: 0 0 20px 0;
    padding-left: 30px;
    border-left: 4px solid #b30004;
}

.testimonial-highlight cite {
    color: #666;
    font-style: normal;
    font-weight: 600;
}

.stats-grid {
    display: grid;
    gap: 20px;
}

.stat-card {
    text-align: center;
    padding: 20px;
    background: #f8f9fb;
    border-radius: 8px;
}

.stat-card .stat-number {
    font-size: 1.8rem;
}

/* Call to Action */
.home-cta {
    padding: 80px 20px;
    background: linear-gradient(135deg, #b30004 0%, #9a0003 100%);
    color: #fff;
    text-align: center;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0.9;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.cta-phone {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: center;
}

.phone-link {
    color: #b30004;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1.5rem;
}

.phone-link:hover {
    color: #9a0003;
    text-decoration: underline;
}

.cta-phone .phone-link {
    color: #fff;
    font-weight: 700;
}

.cta-phone .phone-link:hover {
    text-decoration: underline;
}

/* Footer */
.footer { 
    background: #2c3e50; 
    color: #eee; 
    padding: 60px 20px 20px; 
    margin-top: 40px; 
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 40px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
}

.footer-company h4 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.footer-company p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

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

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #b30004;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #34495e;
    padding-top: 20px;
    flex-wrap: wrap;
    gap: 20px;
}

.legal-links {
    display: flex;
    gap: 20px;
}

.legal-links a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.85rem;
}

.legal-links a:hover {
    color: #fff;
}

/* Contact Form */
.contact-form { 
    display: flex; 
    flex-direction: column; 
    gap: 20px; 
    max-width: 600px; 
    margin: 20px auto; 
}

.contact-form input, .contact-form textarea, .contact-form select { 
    padding: 15px; 
    border: 2px solid #ddd; 
    border-radius: 6px; 
    font-size: 1rem; 
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
    outline: none;
    border-color: #b30004;
    box-shadow: 0 0 0 2px rgba(179, 0, 4, 0.2);
}

.contact-form button { 
    cursor: pointer; 
    transition: all 0.3s ease;
}

.contact-form button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.form-note {
    font-size: 0.85rem;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

/* Form Field Validation States */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(179, 0, 4, 0.2);
    border-color: #b30004;
}

input.valid, select.valid, textarea.valid {
    border-color: #28a745;
}

input.invalid, select.invalid, textarea.invalid {
    border-color: #dc3545;
}

/* Form Loading States */
button[disabled] {
    opacity: 0.7;
    cursor: not-allowed;
}

.form-loading {
    position: relative;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top-color: #b30004;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Form Success States */
.form-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

.form-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 10px 0;
}

/* Timeline Styles for About Page */
.about-timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.about-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #b30004;
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 40px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-year {
    background: #b30004;
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    font-weight: 700;
    text-align: center;
    min-width: 120px;
    position: relative;
    z-index: 2;
}

.timeline-content {
    flex: 1;
    padding: 20px 30px;
    background: #f9f9f9;
    border-radius: 12px;
    margin: 0 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.timeline-content h3 {
    color: #1a1a1a;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.timeline-content p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Quote Form Styles */
.quote-section {
    padding: 80px 20px;
    background: #f8f9fb;
}

.quote-intro {
    text-align: center;
    margin-bottom: 50px;
}

.quote-form {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: #1a1a1a;
    margin-bottom: 20px;
    font-size: 1.3rem;
    border-bottom: 2px solid #b30004;
    padding-bottom: 10px;
}

/* Navigation Active States */
.main-nav a.active,
.mobile-nav a.active {
    color: #b30004;
    font-weight: 600;
    position: relative;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #b30004;
}

/* Enhanced Image Loading */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #b30004;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.scroll-to-top:hover {
    background: #9a0003;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.scroll-to-top:active {
    transform: translateY(0);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(179, 0, 4, 0.3);
    border-radius: 50%;
    border-top-color: #b30004;
    animation: spin 1s ease-in-out infinite;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Focus Visible for Keyboard Navigation */
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #b30004;
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-nav.active {
        display: flex;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 20px;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .testimonials-preview {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-actions {
        gap: 30px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .about-timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 70px;
    }
    
    .timeline-item:nth-child(even) {
        flex-direction: row !important;
    }
    
    .timeline-year {
        position: absolute;
        left: 0;
        min-width: 80px;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
    
    .timeline-content {
        margin: 0;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }
    
    .hero {
        padding: 80px 15px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
    }
    
    .quote-form {
        padding: 25px;
    }
    
    .scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
}

/* Print Styles */
@media print {
    .scroll-to-top,
    .mobile-menu-toggle,
    .header-cta,
    .hero-actions {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
    }
    
    .hero {
        background: white !important;
        color: black !important;
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}