/* Root Variables */
:root {
    --primary-color: #FF8C00;
    --primary-dark: #cc7000;
    --bg-dark: #1a1a1a;
    --charcoal: #333333;
    --white: #FFFFFF;
    --gray-light: #f4f4f4;
    --gray-medium: #888888;
    --heading-font: 'Oswald', sans-serif;
    --body-font: 'Roboto', sans-serif;
    --transition: all 0.2s ease-in-out;
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    line-height: 1.7;
    color: var(--charcoal);
    background-color: var(--white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
}

h1,
h2,
h3,
h4 {
    font-family: var(--heading-font);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--heading-font);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: scale(1.03);
}

.btn-outline {
    background-color: transparent;
    border: 3px solid var(--charcoal);
    color: var(--charcoal);
}

.btn-outline:hover {
    background-color: var(--charcoal);
    color: var(--white);
}

.btn-outline-white {
    background-color: transparent;
    border: 3px solid var(--white);
    color: var(--white);
}

.btn-outline-white:hover {
    background-color: var(--white);
    color: var(--charcoal);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.2rem;
}

/* Top Bar */
.top-bar {
    background-color: var(--bg-dark);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.8rem;
    font-weight: 500;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
}

.top-bar i {
    color: var(--primary-color);
    margin-right: 5px;
}

/* Navigation */
.navbar {
    background: var(--white);
    padding: 20px 0;
    border-bottom: 5px solid var(--primary-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--charcoal);
}

.logo i {
    color: var(--primary-color);
}

.logo-accent {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
}

/* Hide hamburger on desktop */
.menu-toggle {
    display: none;
}

.nav-link {
    margin-left: 30px;
    font-weight: 700;
    font-family: var(--heading-font);
}

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

.cta-link {
    background-color: var(--charcoal);
    color: var(--white) !important;
    padding: 8px 20px;
    margin-left: 20px;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-dark);
    min-width: 250px;
    display: none;
    z-index: 1100;
}

.nav-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 15px 20px;
    color: var(--white);
    border-bottom: 1px solid #333;
}

.dropdown-menu li a:hover {
    background: var(--primary-color);
}

/* Hero */
.hero {
    height: 90vh;
    background: url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?auto=format&fit=crop&w=1920&q=80') center/cover;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-text h1 {
    font-size: 5rem;
    line-height: 0.9;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    font-weight: 300;
}

.hero-ctas .btn {
    margin-right: 20px;
}

.hero-badges {
    margin-top: 50px;
    display: flex;
    gap: 30px;
    font-weight: 700;
    font-family: var(--heading-font);
    color: var(--primary-color);
}

/* Features */
.features {
    padding: 60px 0;
    background: var(--gray-light);
}

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

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

.icon-box {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Sections */
section {
    padding: 100px 0;
}

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

.section-header h2 {
    font-size: 3rem;
}

.accent-line {
    width: 100px;
    height: 10px;
    background: var(--primary-color);
    margin: 20px auto;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    border: 2px solid #eee;
    transition: var(--transition);
}

.service-card:hover {
    border-color: var(--primary-color);
}

.service-img {
    height: 250px;
    background-size: cover;
    background-position: center;
    border-bottom: 5px solid var(--primary-color);
}

.service-content {
    padding: 30px;
}

.service-content h3 {
    margin-bottom: 15px;
}

/* Portfolio */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.portfolio-item-wrap {
    position: relative;
    height: 400px;
    overflow: hidden;
    background: #000;
}

.portfolio-item-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: var(--transition);
}

.portfolio-item-wrap:hover img {
    transform: scale(1.1);
    opacity: 0.4;
}

.overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    width: 100%;
}

.overlay h4 {
    font-size: 1.5rem;
}

/* Footer */
footer {
    background: var(--bg-dark);
    color: #ccc;
    padding: 100px 0 0;
}

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

.f-brand .logo {
    color: var(--white);
    margin-bottom: 20px;
    display: block;
}

.f-links h4,
.f-contact h4 {
    color: var(--white);
    margin-bottom: 30px;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
}

.f-links ul li {
    margin-bottom: 15px;
}

.f-links a:hover {
    color: var(--primary-color);
}

.f-contact i {
    color: var(--primary-color);
    margin-right: 10px;
    width: 20px;
}

.bottom-bar {
    background: #000;
    padding: 30px 0;
    text-align: center;
    font-size: 0.8rem;
    border-top: 1px solid #222;
}

/* Responsive */
@media (max-width: 992px) {
    .hero-text h1 {
        font-size: 3.5rem;
    }

    .features-grid,
    .services-grid,
    .portfolio-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

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

/* Testimonials */
.testimonials {
    background-color: var(--gray-light);
}

.testimonials .section-header h2 {
    color: var(--charcoal);
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.testimonial-card {
    background: var(--white);
    color: var(--charcoal);
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-top: 3px solid var(--primary-color);
}

.testimonial-card:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.stars {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.stars i {
    margin-right: 2px;
}

.testimonial-card p {
    font-size: 1.1rem;
    font-style: italic;
    line-height: 1.7;
    margin-bottom: 20px;
}

.testimonial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.customer {
    font-weight: 700;
    color: var(--primary-dark);
}

.verified-badge {
    font-size: 0.8rem;
    color: var(--gray-medium);
    display: flex;
    align-items: center;
    gap: 5px;
}

.verified-badge i {
    color: #4285f4;
}

/* --- FIX: Top Bar CTA Button Visibility --- */
.top-actions .btn-outline {
    background-color: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    color: var(--white, #ffffff) !important;
}

.top-actions .btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.15) !important;
    border-color: var(--white, #ffffff) !important;
    color: var(--white, #ffffff) !important;
}

.top-actions .btn:not(.btn-outline):not(.btn-emergency-sm) {
    background-color: var(--accent-color, #e67e22) !important;
    color: var(--white, #ffffff) !important;
    border: none !important;
}

.top-actions .btn:not(.btn-outline):hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2) !important;
}

/* ------------------------------------------ */

/* CHAT WIDGET */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
}

.chat-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white, #ffffff);
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-btn:hover {
    background: var(--accent-color, #333);
    transform: scale(1.1);
}

.chat-popup {
    position: absolute;
    bottom: 75px;
    right: 0;
    width: 320px;
    background: var(--white, #ffffff);
    border-radius: var(--radius, 8px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: none;
    overflow: hidden;
}

.chat-popup.active {
    display: block;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: var(--primary-color);
    color: var(--white, #ffffff);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 {
    color: var(--white, #ffffff);
    font-size: 1rem;
    margin: 0;
}

.chat-close {
    background: none;
    border: none;
    color: var(--white, #ffffff);
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.8;
}

.chat-close:hover {
    opacity: 1;
}

.chat-body {
    padding: 20px;
    background: #f8fafc;
}

.chat-body p {
    font-size: 0.9rem;
    margin-bottom: 15px;
    color: #333;
}

.chat-body input {
    width: 100%;
    padding: 10px 14px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
}

.chat-body input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* =============================================
   MOBILE RESPONSIVE STYLES
   ============================================= */

/* Tablet */
@media (max-width: 992px) {
    .hero-text h1 {
        font-size: 3.5rem;
    }

    .features-grid,
    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

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

/* Mobile */
@media (max-width: 768px) {

    /* Top Bar */
    .contact-info {
        display: none;
    }

    .top-bar-content {
        justify-content: center;
    }

    /* Hamburger */
    .menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 5px;
    }

    .bar {
        display: block;
        width: 25px;
        height: 3px;
        background: var(--charcoal);
        border-radius: 3px;
        transition: var(--transition);
    }

    .navbar {
        position: sticky;
        top: 0;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        background: var(--white);
        padding: 10px 0 20px;
        gap: 0;
        z-index: 2000;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
        border-top: 4px solid var(--primary-color);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .nav-link {
        display: block;
        padding: 16px 20px;
        margin: 0;
        font-size: 1rem;
        color: var(--charcoal);
    }

    .cta-link {
        margin: 10px 20px 0;
        text-align: center;
        padding: 14px 20px;
        width: calc(100% - 40px);
        color: var(--white) !important;
        display: block;
    }

    .nav-dropdown .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        background: var(--gray-light);
        border: none;
        padding: 0;
        min-width: unset;
    }

    .nav-dropdown.open .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding: 12px 15px;
        font-size: 0.9rem;
        color: var(--charcoal);
        border-bottom: 1px solid #ddd;
    }

    .dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }

    /* Hero */
    .hero {
        height: auto;
        min-height: 85vh;
        padding: 100px 0 60px;
    }

    .hero-text h1 {
        font-size: 2.4rem;
        line-height: 1;
    }

    .hero-text p {
        font-size: 1.1rem;
    }

    .hero-ctas {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .hero-ctas .btn {
        width: 100%;
        text-align: center;
        margin-right: 0;
    }

    .hero-badges {
        flex-direction: column;
        gap: 10px;
        font-size: 0.85rem;
    }

    /* Sections */
    section {
        padding: 60px 0;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    /* Grids */
    .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .testimonial-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    /* Stats 4-col to 2-col */
    div[style*="repeat(4, 1fr)"] {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    /* Two-column content to single */
    div[style*="grid-template-columns: 1fr 1.2fr"],
    div[style*="grid-template-columns: 1fr 1.4fr"],
    div[style*="grid-template-columns: 1.2fr 1fr"],
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Portfolio item height */
    .portfolio-item-wrap {
        height: 260px;
    }

    .service-img {
        height: 180px;
    }

    /* Btn full width */
    .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }
}