/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --success-color: #4bb543;
    --success-hover: #3a9434;
    --danger-color: #f72585;
    --dark-color: #1e1e2f;
    --gray-color: #6c757d;
    --border-radius: 10px;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
    --topbar-height: 68px;
    
    /* Light Theme Variables */
    --bg-body: #f4f7fc;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #ffffff;
    --bg-info-btn: #f0f0f0;
    --bg-duration-box: #f8f9fa;
    --bg-modal-content: #ffffff;
    --bg-modal-header: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-sidebar: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-footer: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    --text-primary: #333333;
    --text-heading: #1e1e2f;
    --text-description: #6c757d;
    --text-service-feature: #444;
    --text-muted: #6c757d;
    --text-sidebar: #ffffff;
    --text-footer: rgba(255,255,255,0.82);
    --text-footer-hover: #ffffff;
    --text-copyright: rgba(255,255,255,0.6);
    
    --border-input: #e0e0e0;
    --border-modal-footer: #f0f0f0;
    --border-service-feature: #f5f5f5;
    --border-sidebar-link: rgba(255,255,255,0.1);
    --border-footer-copyright: rgba(255,255,255,0.12);
    --border-modal-img: #f0f0f0;
    
    --shadow-topbar: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-card: 0 3px 12px rgba(0,0,0,0.08);
    --shadow-card-hover: 0 12px 28px rgba(0,0,0,0.14);
    --shadow-modal: 0 10px 40px rgba(0,0,0,0.2);
    --shadow-sidebar: -5px 0 20px rgba(0,0,0,0.2);
    --shadow-notification: 0 4px 20px rgba(0,0,0,0.15);
    
    --overlay-bg: rgba(0,0,0,0.4);
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-footer: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    --footer-social-bg: rgba(255,255,255,0.15);
    --footer-social-hover-bg: #ffffff;
    --footer-heading-line: rgba(255,255,255,0.7);
}

/* Dark Theme Overrides */
[data-theme="dark"] {
    --bg-body: #121212;
    --bg-white: #1e1e2f;
    --bg-card: #1e1e2f;
    --bg-input: #2a2a3e;
    --bg-info-btn: #2a2a3e;
    --bg-duration-box: #2a2a3e;
    --bg-modal-content: #1e1e2f;
    --bg-modal-header: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-sidebar: linear-gradient(135deg, #1a1a2e 0%, #2a1a3e 100%);
    --bg-footer: linear-gradient(135deg, #1a1a2e 0%, #2a1a3e 100%);
    
    --text-primary: #e0e0e0;
    --text-heading: #e0e0e0;
    --text-description: #a0a0b0;
    --text-service-feature: #b0b0c0;
    --text-muted: #a0a0b0;
    --text-sidebar: #ffffff;
    --text-footer: rgba(255,255,255,0.75);
    --text-footer-hover: #ffffff;
    --text-copyright: rgba(255,255,255,0.5);
    
    --border-input: #3a3a4e;
    --border-modal-footer: #3a3a4e;
    --border-service-feature: #2a2a3e;
    --border-sidebar-link: rgba(255,255,255,0.08);
    --border-footer-copyright: rgba(255,255,255,0.08);
    --border-modal-img: #3a3a4e;
    
    --shadow-topbar: 0 2px 10px rgba(0,0,0,0.3);
    --shadow-card: 0 3px 12px rgba(0,0,0,0.2);
    --shadow-card-hover: 0 12px 28px rgba(0,0,0,0.4);
    --shadow-modal: 0 10px 40px rgba(0,0,0,0.5);
    --shadow-sidebar: -5px 0 20px rgba(0,0,0,0.5);
    --shadow-notification: 0 4px 20px rgba(0,0,0,0.3);
    
    --overlay-bg: rgba(0,0,0,0.7);
    
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-footer: linear-gradient(135deg, #1a1a2e 0%, #2a1a3e 100%);
    
    --footer-social-bg: rgba(255,255,255,0.08);
    --footer-social-hover-bg: var(--primary-color);
    --footer-heading-line: rgba(255,255,255,0.5);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    color: var(--text-primary);
    background-color: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.3s ease, color 0.3s ease;
}

main { flex: 1; }

h1, h2, h3, h4, h5, h6 { 
    font-weight: 600; 
    color: var(--text-heading);
    transition: color 0.3s ease;
}

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

/* ===== THEME TOGGLE BUTTON ===== */
.theme-toggle-btn {
    position: relative;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid var(--border-input);
    background: var(--bg-input);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    flex-shrink: 0;
    outline: none;
}

.theme-toggle-btn:hover {
    transform: rotate(15deg) scale(1.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(67, 97, 238, 0.3);
}

.theme-toggle-btn:active {
    transform: rotate(15deg) scale(0.95);
}

.theme-toggle-btn i {
    position: absolute;
    font-size: 1.1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    color: var(--text-heading);
}

.theme-toggle-btn .fa-sun {
    opacity: 0;
    transform: translateY(30px) rotate(-90deg);
    color: #f8961e;
}

.theme-toggle-btn .fa-moon {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
    color: #6366f1;
}

[data-theme="dark"] .theme-toggle-btn .fa-sun {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

[data-theme="dark"] .theme-toggle-btn .fa-moon {
    opacity: 0;
    transform: translateY(-30px) rotate(90deg);
}

[data-theme="dark"] .theme-toggle-btn:hover {
    box-shadow: 0 0 15px rgba(248, 150, 30, 0.3);
}

/* ===== SIDEBAR OVERLAY ===== */
#sidebarOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--overlay-bg);
    z-index: 1040;
}

#sidebarOverlay.active { display: block; }

/* ===== SIDEBAR ===== */
#sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1050;
    top: 0;
    right: 0;
    background: var(--bg-sidebar);
    overflow-x: hidden;
    transition: width 0.3s ease;
    box-shadow: var(--shadow-sidebar);
    padding-top: 70px;
}

#sidebar a {
    padding: 14px 28px;
    font-size: 15px;
    display: flex;
    align-items: center;
    color: var(--text-sidebar);
    border-bottom: 1px solid var(--border-sidebar-link);
    white-space: nowrap;
    transition: var(--transition);
}

#sidebar a:hover {
    background: rgba(255,255,255,0.2);
    padding-left: 38px;
}

#sidebar a i {
    margin-right: 12px;
    width: 18px;
    flex-shrink: 0;
}

#sidebar .closebtn {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 28px;
    border-bottom: none;
    padding: 5px;
    display: flex;
    align-items: center;
    color: var(--text-sidebar);
}

#sidebar .closebtn:hover { background: transparent; padding-left: 5px; }

/* ===== TOP BAR ===== */
.top-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-white);
    padding: 10px 20px;
    box-shadow: var(--shadow-topbar);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: var(--topbar-height);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.logo-link { flex-shrink: 0; }

.logo {
    width: 130px;
    height: auto;
    display: block;
    transition: var(--transition);
}

.logo:hover { transform: scale(1.05); }

/* Search */
.search-container {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: 520px;
}

.location-select {
    flex-shrink: 0;
    border-radius: 25px;
    padding: 8px 14px;
    border: 1px solid var(--border-input);
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    outline: none;
    transition: var(--transition), background-color 0.3s ease, color 0.3s ease;
    max-width: 100px;
}

.location-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.search-input {
    flex: 1;
    min-width: 0;
    padding: 8px 16px;
    border-radius: 25px;
    border: 1px solid var(--border-input);
    background-color: var(--bg-input);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: var(--transition), background-color 0.3s ease, color 0.3s ease;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

.search-btn {
    flex-shrink: 0;
    border-radius: 25px;
    padding: 8px 18px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.search-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-1px);
}

.top-bar-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.login-btn {
    white-space: nowrap;
    font-size: 14px;
    padding: 8px 18px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hamburger {
    font-size: 26px;
    cursor: pointer;
    color: var(--text-heading);
    background: none;
    border: none;
    padding: 4px 6px;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.hamburger:hover { color: var(--primary-color); }

/* ===== BUTTONS ===== */
.btn {
    padding: 9px 20px;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.3);
    color: white;
}

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

.btn-success:hover {
    background-color: var(--success-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(75, 181, 67, 0.3);
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

/* ===== SERVICES SECTION ===== */
.services-section {
    padding: 40px 16px 50px;
}

.section-header {
    margin-bottom: 36px;
}

.section-header h2 {
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    color: var(--text-heading);
    transition: color 0.3s ease;
}

.section-header .lead {
    font-size: 1rem;
    color: var(--text-muted);
    margin-top: 8px;
    transition: color 0.3s ease;
}

/* ===== SERVICE CARDS ===== */
.service-card {
    background: var(--bg-card);
    border-radius: 14px;
    overflow: hidden;
    transition: var(--transition), background-color 0.3s ease;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-card-hover);
}

.card-img-wrap {
    width: 100%;
    height: 190px;
    overflow: hidden;
    flex-shrink: 0;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.service-card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.card-body-inner {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.service-card .title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--text-heading);
    margin-bottom: 6px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.service-card .description {
    font-size: 0.88rem;
    color: var(--text-description);
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.service-card .price {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.card-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: auto;
}

.card-actions .btn {
    flex: 1;
    justify-content: center;
    font-size: 0.88rem;
    padding: 8px 10px;
}

.info-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-info-btn);
    border-radius: 50%;
    color: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: var(--transition), background-color 0.3s ease, color 0.3s ease;
    font-size: 14px;
}

.info-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* ===== MODAL ===== */
.modal { z-index: 1060; }
.modal-backdrop { z-index: 1055; }

.modal-content {
    border-radius: 14px;
    border: none;
    box-shadow: var(--shadow-modal);
    background-color: var(--bg-modal-content);
    transition: background-color 0.3s ease;
}

.modal-header {
    background: var(--bg-modal-header);
    color: white;
    border-radius: 14px 14px 0 0;
    padding: 14px 20px;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover { opacity: 1; }

.modal-title {
    font-weight: 600;
    color: white;
    font-size: 1rem;
}

.modal-body { 
    padding: 22px;
    color: var(--text-primary);
    transition: color 0.3s ease;
}

.modal-body .modal-service-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 14px;
    border: 1px solid var(--border-modal-img);
    transition: border-color 0.3s ease;
}

.service-detail-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.service-detail-price {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
}

.service-detail-description {
    color: var(--text-description);
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.94rem;
    transition: color 0.3s ease;
}

.duration-box {
    background: var(--bg-duration-box);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.92rem;
    margin-bottom: 4px;
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.service-features-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-heading);
    margin-bottom: 10px;
    transition: color 0.3s ease;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 6px 0;
    font-size: 0.88rem;
    color: var(--text-service-feature);
    border-bottom: 1px solid var(--border-service-feature);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.service-features li i {
    color: var(--success-color);
    flex-shrink: 0;
    font-size: 12px;
}

.modal-footer {
    border-top: 1px solid var(--border-modal-footer);
    padding: 14px 20px;
    gap: 8px;
    transition: border-color 0.3s ease;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gradient-footer);
    color: white;
    padding: 50px 0 20px;
    margin-top: 20px;
    transition: background 0.3s ease;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 10px;
    position: relative;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 45px;
    height: 2px;
    background: var(--footer-heading-line);
    border-radius: 2px;
}

.footer p {
    color: var(--text-footer);
    line-height: 1.6;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

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

.footer ul li { margin-bottom: 9px; }

.footer ul li a {
    color: var(--text-footer);
    font-size: 0.93rem;
    transition: var(--transition), color 0.3s ease;
}

.footer ul li a:hover { 
    color: var(--text-footer-hover); 
    padding-left: 5px; 
}

.footer ul li i { margin-right: 8px; width: 16px; }

.footer-contact-link {
    color: var(--text-footer) !important;
    text-decoration: none;
    transition: var(--transition), color 0.3s ease;
}

.footer-contact-link:hover {
    color: var(--text-footer-hover) !important;
    text-decoration: underline;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--footer-social-bg);
    border-radius: 50%;
    color: white;
    font-size: 0.9rem;
    transition: var(--transition), background-color 0.3s ease;
}

.social-links a:hover {
    background: var(--footer-social-hover-bg);
    color: var(--primary-color);
    transform: translateY(-3px);
}

.contact-info { padding: 0; }

.contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: var(--text-footer);
    font-size: 0.93rem;
    margin-bottom: 9px;
    transition: color 0.3s ease;
}

.contact-info li i {
    margin-top: 2px;
    color: rgba(255,255,255,0.9);
    flex-shrink: 0;
    width: 16px;
}

.newsletter-form {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.newsletter-form input {
    flex: 1;
    min-width: 0;
    padding: 10px 15px;
    border-radius: 25px;
    border: none;
    outline: none;
    font-size: 14px;
    background-color: rgba(255,255,255,0.9);
    color: #333;
}

.newsletter-form input::placeholder {
    color: #888;
}

.newsletter-form button {
    flex-shrink: 0;
    padding: 10px 18px;
    border-radius: 25px;
    border: none;
    background: var(--primary-color);
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.newsletter-form button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

.copyright {
    text-align: center;
    padding-top: 28px;
    margin-top: 28px;
    border-top: 1px solid var(--border-footer-copyright);
    color: var(--text-copyright);
    font-size: 0.88rem;
    transition: border-color 0.3s ease, color 0.3s ease;
}

/* ===== NOTIFICATION ===== */
.alert {
    position: fixed;
    top: 80px;
    right: 16px;
    z-index: 9999;
    min-width: 280px;
    max-width: calc(100vw - 32px);
    border-radius: 10px;
    box-shadow: var(--shadow-notification);
}

/* ===== RESPONSIVE: TABLET (max 991px) ===== */
@media (max-width: 991px) {
    .top-bar { padding: 10px 16px; gap: 10px; }
    .logo { width: 110px; }
    .search-container { max-width: 100%; }

    .service-features {
        grid-template-columns: 1fr;
    }
    
    .theme-toggle-btn {
        width: 40px;
        height: 40px;
    }
    .theme-toggle-btn i {
        font-size: 1rem;
    }
}

/* ===== RESPONSIVE: MOBILE (max 767px) ===== */
@media (max-width: 767px) {
    .top-bar { padding: 8px 12px; gap: 8px; flex-wrap: nowrap; }
    .logo { width: 90px; }
    .location-select { display: none; }
    .search-input { padding: 7px 12px; font-size: 13px; }

    .search-btn .btn-text { display: none; }
    .search-btn { padding: 8px 12px; }

    .login-btn .btn-text { display: none; }
    .login-btn { padding: 8px 12px; }

    .services-section { padding: 24px 12px 40px; }

    .section-header { margin-bottom: 24px; }

    .card-img-wrap { height: 160px; }

    .newsletter-form { flex-direction: column; gap: 10px; }

    .newsletter-form input,
    .newsletter-form button { width: 100%; }

    .footer { padding: 36px 0 16px; }

    .modal-body { padding: 16px; }

    .service-features { grid-template-columns: 1fr; }
    
    .theme-toggle-btn {
        width: 36px;
        height: 36px;
    }
    .theme-toggle-btn i {
        font-size: 0.95rem;
    }
}

/* ===== RESPONSIVE: SMALL MOBILE (max 480px) ===== */
@media (max-width: 480px) {
    .logo { width: 76px; }
    .top-bar { padding: 7px 10px; gap: 6px; }
    .hamburger { font-size: 22px; }

    .card-img-wrap { height: 140px; }

    .service-card .title { font-size: 0.95rem; }
    .service-card .price { font-size: 1rem; }

    .card-actions { gap: 6px; }
    .card-actions .btn { padding: 7px 8px; font-size: 0.82rem; }

    .info-btn { width: 32px; height: 32px; font-size: 12px; }
    
    .theme-toggle-btn {
        width: 30px;
        height: 30px;
    }
    .theme-toggle-btn i {
        font-size: 0.85rem;
    }
}

@media (max-width: 380px) {
    .theme-toggle-btn {
        width: 28px;
        height: 28px;
    }
    .theme-toggle-btn i {
        font-size: 0.8rem;
    }
}