/* Crystal Automotive Repairs - Common Styles */

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    color: #333;
}

/* ========================================
   Header & Navigation
   ======================================== */
header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 0 2px 20px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 10px 0;
    background: rgba(26, 26, 46, 0.95);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
}

.logo span {
    color: #e94560;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    display: block;
    padding: 5px 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: #e94560;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #e94560;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Dropdown Menu Styles */
.nav-links .has-dropdown > a {
    padding-right: 15px;
}

.nav-links .has-dropdown > a::before {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.nav-links .has-dropdown:hover > a::before {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    min-width: 220px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    padding: 10px 0;
    margin-top: 15px;
}

.nav-links .has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    padding: 12px 20px;
    display: block;
    color: #fff;
    font-size: 15px;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.dropdown-menu a::after {
    display: none;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: rgba(233, 69, 96, 0.1);
    border-left-color: #e94560;
    padding-left: 25px;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-block;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(135deg, #e94560 0%, #d32f4f 100%);
    color: white;
    box-shadow: 0 5px 20px rgba(233, 69, 96, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: #1a1a2e;
    transform: translateY(-3px);
}

/* Secondary button variant for light backgrounds */
.service-card .btn-secondary,
.services-grid .btn-secondary {
    background: transparent;
    color: #1a1a2e;
    border: 2px solid #1a1a2e;
}

.service-card .btn-secondary:hover,
.services-grid .btn-secondary:hover {
    background: #1a1a2e;
    color: white;
    transform: translateY(-3px);
}

/* ========================================
   Page Header (used on subpages)
   ======================================== */
.page-header {
    padding: 150px 5% 80px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    text-align: center;
    color: white;
}

.page-header h1 {
    font-size: 50px;
    margin-bottom: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.page-header p {
    font-size: 20px;
    color: #ccc;
    max-width: 800px;
    margin: 0 auto;
}

/* ========================================
   Footer
   ======================================== */
footer {
    background: #0f0f1e;
    color: white;
    padding: 60px 5% 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto 40px;
}

.footer-section h3 {
    font-size: 22px;
    margin-bottom: 20px;
    color: #e94560;
}

.footer-section p,
.footer-section a {
    color: #ccc;
    text-decoration: none;
    line-height: 1.8;
    font-size: 15px;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.footer-section p {
    display: block;
}

.footer-section a {
    display: block;
}

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

.footer-section i {
    margin-right: 10px;
    color: #e94560;
}

/* Keep contact info links inline with icons */
.footer-section p a {
    display: inline;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #1a1a2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #e94560;
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #888;
}

/* ========================================
   Responsive Design - Mobile Navigation
   ======================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #1a1a2e;
        flex-direction: column;
        padding: 20px;
        gap: 20px;
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    /* Mobile Dropdown Styles */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(233, 69, 96, 0.1);
        margin: 10px 0 0 0;
        border-radius: 8px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0;
    }

    .nav-links .has-dropdown.active .dropdown-menu {
        max-height: 300px;
        padding: 10px 0;
    }

    .nav-links .has-dropdown > a::before {
        right: 10px;
    }

    .dropdown-menu a {
        padding: 10px 20px;
        font-size: 14px;
    }

    .dropdown-menu a:hover {
        padding-left: 25px;
    }

    .page-header h1 {
        font-size: 36px;
    }

    .page-header p {
        font-size: 18px;
    }
}

/* ========================================
   Utility Classes
   ======================================== */
.section-title {
    text-align: center;
    font-size: 40px;
    margin-bottom: 60px;
    color: #1a1a2e;
    font-weight: 700;
}

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

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}
