/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
nav {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 60px; /* Fixed height for the navbar */
}

.navbar-logo {
    height: 100%; /* Match the navbar height exactly */
    width: auto; /* Maintain aspect ratio */
    margin-right: 20px;
    padding: 5px 0; /* Add some vertical padding */
    max-height: 50px; /* Ensure logo isn't too tall */
}

.menu {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 20px;
    margin-left: auto;
}

.menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 10px;
    transition: color 0.3s;
}

.menu a:hover {
    color: #007bff;
}

.menu a.active {
    color: #007bff;
}

.menu-icon {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #fff;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1;
    border-radius: 4px;
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    cursor: pointer; /* Ensure cursor shows it's clickable */
}

/* Only use hover on non-touch devices */
@media (hover: hover) {
    .dropdown:hover .dropdown-content {
        display: block;
    }
}

/* Header */
header {
    background-color: #007bff;
    padding: 60px 0;
    text-align: center;
    margin-bottom: 40px;
    color: #fff;
    position: relative;
}

.header-logo {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

header p {
    font-size: 1.2em;
    margin-bottom: 30px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    .header-logo {
        max-width: 120px;
    }
}

@media (max-width: 480px) {
    .header-logo {
        max-width: 100px;
    }
}

/* Breadcrumbs */
.breadcrumbs {
    background-color: #f8f9fa;
    padding: 10px 0;
    margin-bottom: 30px;
}

.breadcrumbs ul {
    list-style: none;
    display: flex;
    gap: 10px;
}

.breadcrumbs li:not(:last-child):after {
    content: "›";
    margin-left: 10px;
    color: #666;
}

.breadcrumbs a {
    text-decoration: none;
    color: #007bff;
}

/* Service Grid */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.service-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card img {
    width: 100%;
    height: auto;
    border-radius: 4px;
    margin-bottom: 15px;
}

.service-card h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.service-card p {
    color: #666;
    margin-bottom: 15px;
}

.service-card ul {
    list-style-position: inside;
    margin-bottom: 15px;
}

.service-card li {
    margin-bottom: 8px;
    color: #666;
}

/* Buttons */
.cta-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: #0056b3;
}

/* Dark blue variant for header call-to-action button */
.header-cta {
    background-color: #0056b3; /* Dark blue from the hover state */
}

.header-cta:hover {
    background-color: #004494; /* Even darker blue for hover state */
}

/* Blog Post */
.blog-post {
    max-width: 800px;
    margin: 0 auto;
}

.blog-post img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.post-meta {
    color: #666;
    margin-bottom: 20px;
}

/* Forms */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group textarea {
    height: 120px;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer-section {
    margin-bottom: 30px;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 20px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9em;
    opacity: 0.8;
}

/* Utility Classes */
.mt-2 {
    margin-top: 2rem;
}

.text-center {
    text-align: center;
}

.img-responsive {
    max-width: 100%;
    height: auto;
}

/* Floating Call Button */
.floating-call {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 24px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    z-index: 9999;
    text-align: center;
    line-height: 60px;
    /* Ensure visibility on all devices */
    opacity: 1 !important;
    visibility: visible !important;
    transform: scale(1) !important;
    /* Add a subtle animation to draw attention */
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.floating-call:hover, .floating-call:focus, .floating-call:active {
    transform: scale(1.1) !important;
    color: white;
    text-decoration: none;
    animation: none; /* Stop animation on hover */
}

/* Testimonials */
blockquote {
    font-style: italic;
    position: relative;
    padding: 20px;
}

blockquote p {
    margin-bottom: 10px;
}

blockquote footer {
    font-style: normal;
    font-weight: bold;
    color: #666;
    background: none;
    padding: 0;
    margin: 0;
}

/* Price Display */
.price {
    font-size: 1.5em;
    color: #007bff;
    font-weight: bold;
    margin: 10px 0;
}

/* Social Media Icons */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.social-icons i {
    font-size: 20px;
    color: #fff;
}

/* Custom WhatsApp button */
.whatsapp-btn {
    background-color: #25D366 !important; /* WhatsApp brand green */
    border: 2px solid #25D366 !important;
}

.whatsapp-btn i {
    color: white !important;
}

.whatsapp-btn:hover {
    background-color: #128C7E !important; /* WhatsApp darker green */
    border-color: #128C7E !important;
}

/* Specific colors for other platforms */

/* Standalone WhatsApp links */
a[href*="whatsapp"] i {
    color: green;
}

/* Make standalone WhatsApp links more visible */
a[href*="whatsapp"] {
    font-size: 24px;
}

.social-icons a[href*="facebook"] {
    background-color: rgba(59, 89, 152, 0.8);
}

.social-icons a[href*="youtube"] {
    background-color: rgba(255, 0, 0, 0.8);
}

.social-icons a[href*="whatsapp"]:hover {
    background-color: #25D366;
}

.social-icons a[href*="whatsapp"]:hover i {
    color: white;
}

.social-icons a[href*="facebook"]:hover {
    background-color: rgba(59, 89, 152, 1);
}

.social-icons a[href*="youtube"]:hover {
    background-color: rgba(255, 0, 0, 1);
}

/* Prevent Lateral Scrolling */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
    max-width: 100vw; /* Ensure no content exceeds viewport width */
}

/* Ensure all content respects viewport width */
img, video, iframe, table {
    max-width: 100% !important;
    height: auto;
}

/* Ensure container doesn't cause overflow */
.container {
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* Media Queries */
@media (max-width: 768px) {
    .navbar-logo {
        height: 40px; /* Fixed height for mobile */
        width: auto;
        padding: 5px 0;
    }
    
    nav {
        justify-content: space-between;
        height: 50px; /* Smaller height for mobile */
    }
    
    .menu-icon {
        display: block;
        position: relative;
        right: 0;
        top: 0;
    }

    .menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        padding: 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        z-index: 1001; /* Ensure menu is above other elements */
        text-align: left; /* Ensure all menu items are left-aligned */
        align-items: flex-start; /* Align items to the start of the flex container */
        max-height: 80vh; /* Limit height to prevent overflow */
        overflow-y: auto; /* Allow scrolling if menu is too long */
    }

    .menu.active {
        display: flex;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        padding-left: 0; /* Remove left padding to align with edge */
        width: 100%;
        display: none;
        max-height: none; /* Allow content to expand */
    }
    
    /* Make dropdown links more tappable and visually distinct */
    .dropdown-content a {
        padding: 15px 20px;
        margin: 5px 0;
        background-color: #f8f9fa; /* Light background to distinguish */
        border-radius: 4px;
        display: block; /* Ensure links are block elements */
        width: 100%; /* Full width for better tap target */
        text-align: left; /* Left align text */
        font-weight: normal; /* Normal weight to distinguish from parent */
        border: 1px solid #e9ecef; /* Subtle border for better visibility */
        cursor: pointer; /* Ensure cursor shows it's clickable */
        -webkit-tap-highlight-color: rgba(0,123,255,0.1); /* Highlight on tap for mobile */
        touch-action: manipulation; /* Optimize for touch */
    }
    
    /* Highlight active dropdown items */
    .dropdown-content a.active {
        background-color: #e9ecef;
        color: #007bff;
        font-weight: bold;
    }
    
    /* Ensure dropdown parent links are distinguishable */
    .dropdown > a {
        position: relative;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    /* Add indicator for dropdown menus */
    .dropdown > a::after {
        content: "▼";
        font-size: 12px;
        margin-left: 5px;
    }

    .service-grid {
        grid-template-columns: 1fr;
    }

    header {
        padding: 40px 0;
    }

    header h1 {
        font-size: 2em;
    }

    .floating-call {
        bottom: 20px !important;
        right: 20px !important;
        width: 50px !important;
        height: 50px !important;
        font-size: 20px !important;
        line-height: 50px !important;
        z-index: 9999 !important; /* Ensure it's above everything */
        position: fixed !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .container {
        padding: 0 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 480px) {
    .service-grid {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
    
    .service-card {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    
    .floating-call {
        width: 45px !important;
        height: 45px !important;
        font-size: 18px !important;
        bottom: 15px !important;
        right: 15px !important;
        line-height: 45px !important;
        z-index: 9999 !important; /* Ensure it's above everything */
        position: fixed !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Ensure dropdown links are easily tappable on small screens */
    .dropdown-content a {
        padding: 15px;
        font-size: 16px;
        min-height: 44px; /* Apple's recommended minimum touch target size */
    }
    
    /* Ensure menu items have enough space */
    .menu a {
        padding: 12px 15px;
        margin: 2px 0;
        display: block;
        width: 100%;
        min-height: 44px; /* Apple's recommended minimum touch target size */
    }
    
    /* Prevent any horizontal overflow */
    body, html, .container, main, header, footer, section, div {
        max-width: 100vw;
        overflow-x: hidden;
    }
}
