/* M Group Car Service - Custom Styles */

/* ========================================
   CSS Variables (Custom Properties)
   ======================================== */
:root {
    --red-primary: #c1322c;
    --red-dark: #a02721;
    --yellow-primary: #eab643;
    --yellow-dark: #d19d2b;
    --black: #1F2937;
    --white: #FFFFFF;
}

/* ========================================
   Animations
   ======================================== */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    overflow-x: hidden;
}

/* ========================================
   Layout & Utilities
   ======================================== */
.section-padding {
    padding: 80px 0;
}

.bg-light-custom {
    background-color: #FAFAFA;
}

.map-container {
    height: 400px;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    background: linear-gradient(rgba(255, 255, 255, 0.90), rgba(255, 255, 255, 0.90)),
                url('../images/bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 90px 0;
    margin-top: 70px;
    display: flex;
    align-items: center;
}

.hero-image {
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.hero-title {
    color: var(--black);
    font-weight: 900;
    letter-spacing: -1px;
}

.hero-subtitle {
    color: var(--black);
}

.hero-slogan {
    color: var(--red-primary);
    font-weight: 800;
}

.hero-animated {
    animation: slideInUp 1s ease-out;
}

/* ========================================
   Navigation
   ======================================== */
.navbar-brand {
    font-weight: 900;
    font-size: 1.5rem;
}

.navbar-logo {
    height: 55px;
    width: auto;
}

.navbar-light-custom {
    background: var(--white) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding-top: 1rem;
    padding-bottom: 1rem;

    .navbar-brand {
        color: var(--black) !important;
    }

    .navbar-nav .nav-link {
        color: var(--black) !important;
        font-weight: 500;
        padding-left: 1rem !important;
        padding-right: 1rem !important;

        &:hover {
            color: var(--red-primary) !important;
        }
    }
}

.navbar-toggler-custom {
    border-color: var(--red-primary);
}

.navbar-phone {
    color: var(--red-primary);
    font-weight: 600;
    text-decoration: none;
}

/* ========================================
   Buttons
   ======================================== */
.btn-primary-custom {
    background: var(--red-primary);
    border: 2px solid var(--red-primary);
    padding: 12px 30px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(193, 50, 44, 0.3);
    color: var(--white);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    box-sizing: border-box;

    &:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(193, 50, 44, 0.4);
        background: var(--red-dark);
        color: var(--white);
    }
}

.btn-outline-dark {
    border: 2px solid var(--black);
    color: var(--black);
    background: transparent;
    padding: 12px 30px;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    box-sizing: border-box;

    &:hover {
        background: var(--black);
        color: var(--white);
        transform: translateY(-2px);
    }
}

/* ========================================
   Section Titles
   ======================================== */
.section-title {
    color: var(--black);
    font-weight: 800;
    position: relative;
    margin-bottom: 3rem;

    &::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 80px;
        height: 4px;
        background: var(--yellow-primary);
        border-radius: 2px;
    }
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    overflow: hidden;

    &:hover {
        transform: translateY(-10px);
        box-shadow: 0 8px 25px rgba(193, 50, 44, 0.2);
    }

    .card-body {
        background: var(--white);
    }
}

.service-icon {
    color: var(--red-primary);
}

/* ========================================
   Hydraulic Section
   ======================================== */
.hydraulic-section {
    background: var(--red-primary);
    color: var(--white);
    position: relative;

    &::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="2" fill="white" opacity="0.1"/></svg>');
        background-size: 50px 50px;
    }
}

.brand-logo {
    width: 120px;
    height: 80px;
    object-fit: contain;
    border-radius: 12px;
    padding: 15px;
    transition: transform 0.3s ease;

    &:hover {
        transform: scale(1.05);
    }
}

/* ========================================
   Pricing Section
   ======================================== */
.pricing-section {
    background: var(--white);
}

.pricing-table-container {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.pricing-table {
    margin-bottom: 0;

    td {
        padding: 0.875rem 1.5rem;
        border: none;
        vertical-align: middle;
        border-bottom: 1px solid #f1f1f1;
    }

    .category-header {
        background: #c1322c;
        font-weight: 700;
        color: var(--white);
        font-size: 1.05rem;

        td {
            border-bottom: none;
            background: transparent;
            color: white;
        }

        &:hover {
            background: var(--red-dark);
        }
    }

    .service-name {
        font-weight: 500;
        color: var(--black);
    }

    .price {
        font-weight: 700;
        color: var(--red-primary);
        text-align: right;
        font-size: 1.05rem;
    }

    tbody tr:hover {
        background-color: rgba(234, 182, 67, 0.05);
    }
}

.pricing-note {
    background: rgba(234, 182, 67, 0.1);
    border-left: 4px solid var(--yellow-primary);
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 0 8px 8px 0;
}

/* ========================================
   Brand Logos
   ======================================== */
.brand-logo-container {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 100px;
    width: 100%;
}

.brand-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ========================================
   Contact Section
   ======================================== */
.contact-info {
    background: var(--black);
    color: var(--white);
}

.contact-icon {
    color: var(--yellow-primary);
}

/* ========================================
   Opening Hours
   ======================================== */
.opening-hours-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: none;
}

.opening-hours-header {
    background: var(--yellow-primary);
    color: var(--black);
    padding: 1.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.opening-hours-body {
    padding: 0;
}

.opening-hours-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.3s ease;

    &:last-child {
        border-bottom: none;
    }

    &:hover {
        background-color: rgba(234, 182, 67, 0.05);
    }
}

.opening-hours-day {
    font-weight: 600;
    color: var(--black);
}

.opening-hours-time {
    font-weight: 500;
    color: var(--red-primary);
}

.opening-hours-closed {
    color: #6c757d;
    font-style: italic;
}

.opening-hours-emergency {
    color: var(--yellow-dark);
    font-weight: 600;
}

/* ========================================
   Footer
   ======================================== */
.footer-custom {
    background: var(--black);
    color: var(--white);
}

/* ========================================
   Table Styles
   ======================================== */
.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(234, 182, 67, 0.1);
}

/* ========================================
   Mobile Responsive Styles
   ======================================== */
@media (max-width: 768px) {
    .hero-slogan {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
        line-height: 1.4;
    }
    
    .section-title,
    .h1 {
        font-size: 1.8rem !important;
    }
    
    .lead {
        font-size: 1rem !important;
    }
    
    .display-4 {
        font-size: 1.5rem !important;
    }
    
    .service-card {
        .card-title {
            font-size: 1.1rem !important;
        }

        .card-text {
            font-size: 0.9rem !important;
        }
    }
    
    .pricing-table {
        .service-name,
        .price {
            font-size: 0.9rem !important;
        }
    }
    
    .navbar-brand {
        font-size: 1.2rem !important;
    }
    
    .navbar-logo {
        height: 35px !important;
    }
    
    .btn-primary-custom,
    .btn-outline-dark {
        font-size: 0.9rem !important;
        padding: 10px 20px !important;
    }
    
    .hero-section {
        padding: 40px 0 !important;
        margin-top: 70px !important;
    }

    .section-padding {
        padding: 60px 0 !important;
    }
}

@media (max-width: 576px) {
    .hero-slogan {
        font-size: 1.7rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
    }
    
    .section-title,
    .h1 {
        font-size: 1.5rem !important;
    }
    
    .btn-primary-custom,
    .btn-outline-dark {
        font-size: 0.85rem !important;
    }
    
    /* Make feature icons larger on mobile */
    .bi.display-4 {
        font-size: 3rem !important;
    }
    
    /* Smaller text for feature titles on mobile */
    .features-section h5 {
        font-size: 1.1rem !important;
    }
    
    /* Hero buttons layout on mobile */
    .hero-section .d-flex {
        flex-direction: row !important;
    }
    
    /* Mobile navigation menu styling */
    .navbar-collapse {
        text-align: center;
    }
    
    .navbar-nav {
        align-items: center;
    }
    
    .navbar-nav .nav-item {
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
    }
    
    .navbar-nav .nav-item:last-of-type {
        border-bottom: none;
    }
    
    .navbar-nav .nav-link {
        padding: 15px 1rem !important;
    }
    
    /* Mobile navbar actions (phone + button) */
    .navbar-collapse .d-flex {
        flex-direction: column !important;
        align-items: center !important;
        gap: 15px !important;
        padding: 20px 0 !important;
        border-top: 1px solid #f0f0f0;
        margin-top: 10px;
    }
    
    .navbar-phone {
        text-align: center;
    }
}

@media (max-width: 370px) {
    /* Hero buttons stacked on very small screens */
    .hero-section .d-flex {
        flex-direction: column !important;
    }
    
    .hero-section .btn {
        display: block !important;
        width: 100% !important;
    }
    
    .pricing-table {
        .service-name,
        .price {
            font-size: 0.8rem !important;
        }
    }
    
    .section-padding {
        padding: 40px 0 !important;
    }
    
    .navbar-logo {
        height: 30px !important;
    }
    
    .hero-section {
        padding-top: 80px !important;
        padding-bottom: 30px !important;
    }
}