/* =================================================================
   Al Nashama Technical Services (ATS) - Enhanced Professional Website
   Complete CSS with compact header and modern design
   ================================================================= */

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

:root {
    /* ATS Brand Colors */
    --primary-orange: #F7931E;
    --secondary-pink: #D14081;
    --accent-green: #8DC63F;
    --accent-blue: #00A9E0;
    --dark-gray: #3D3D3D;
    --light-gray: #F5F5F5;
    --white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    
    /* Spacing */
    --header-padding: 12px;  /* COMPACT HEADER */
    --section-padding: 80px 0;
    --container-max: 1200px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden; /* Prevent horizontal scroll */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent zoom on input focus (iOS) */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    font-size: 16px; /* Minimum 16px prevents iOS zoom */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* === ENHANCED COMPACT HEADER === */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: var(--header-padding) 0; /* COMPACT 12px padding */
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
}

.logo a {
    display: block;
    line-height: 0;
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-main {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-orange);
    letter-spacing: 1px;
}

.logo-sub {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* Navigation - VERTICAL DROPDOWNS */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 0;
    display: block;
    transition: var(--transition-fast);
}

.nav-menu > li > a:hover {
    color: var(--primary-orange);
}

/* Vertical Dropdown Menus */
.has-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    min-width: 250px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-normal);
    margin-top: 10px;
    z-index: 100;
}

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

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition-fast);
    border-left: 3px solid transparent;
}

.dropdown-menu li a:hover {
    background: var(--light-gray);
    border-left-color: var(--primary-orange);
    color: var(--primary-orange);
    padding-left: 25px;
}

/* Header CTA Buttons */
.header-cta {
    display: flex;
    gap: 12px;
}

.btn {
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
    display: inline-block;
}

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

.btn-primary:hover {
    background: #E67E00;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 147, 30, 0.4);
}

.btn-secondary {
    background: var(--accent-green);
    color: var(--white);
}

.btn-secondary:hover {
    background: #7AB82F;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(141, 198, 63, 0.4);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-dark);
    cursor: pointer;
}

/* === HERO SLIDER === */
.hero-slider {
    position: relative;
    height: 600px;
    overflow: hidden;
    width: 100%;
    background: #000;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(61, 61, 61, 0.85), rgba(247, 147, 30, 0.7));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.hero-content {
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 52px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.hero-buttons .btn {
    padding: 14px 32px;
    font-size: 16px;
}

/* Slider Navigation Dots */
.slider-dots {
    position: absolute;
    bottom: 20px; /* Positioned near bottom but with space from edge */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
    padding: 10px 20px;
    background: rgba(0,0,0,0.2);
    border-radius: 25px;
    backdrop-filter: blur(5px);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.6);
    cursor: pointer;
    transition: var(--transition-fast);
    border: 2px solid rgba(255,255,255,0.4);
}

.dot.active {
    background: var(--white);
    width: 30px;
    border-radius: 6px;
    border-color: var(--white);
}

/* === SECTIONS === */
section {
    padding: var(--section-padding);
    position: relative;
    z-index: 10;
    background: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 42px;
    color: var(--dark-gray);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-title p {
    font-size: 18px;
    color: var(--text-light);
}

/* === SERVICE CARDS === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: var(--transition-normal);
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.service-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.service-card-content {
    padding: 25px;
}

.service-card h3 {
    font-size: 22px;
    color: var(--dark-gray);
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.service-card .btn {
    width: 100%;
    text-align: center;
}

/* === FOOTER === */
footer {
    background: var(--dark-gray);
    color: var(--white);
    padding: 60px 0 20px;
}

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

.footer-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--primary-orange);
}

.footer-section ul {
    list-style: none;
}

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

.footer-section ul li a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7);
}

/* === WHATSAPP BUTTON === */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 999;
    transition: var(--transition-normal);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: var(--white);
}

/* === RESPONSIVE - ENHANCED MOBILE OPTIMIZATION === */

/* Tablet Landscape */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 15px;
    }
    
    .nav-menu > li > a {
        font-size: 14px;
    }
    
    .hero-content h1 {
        font-size: 44px;
    }
    
    .section-title h2 {
        font-size: 36px;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Portrait and Mobile */
@media (max-width: 768px) {
    /* Mobile Header */
    header {
        padding: 10px 0;
    }
    
    .logo-img {
        height: 55px; /* Larger logo on mobile for better branding */
    }
    
    .mobile-menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
        animation: slideDown 0.3s ease;
    }
    
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    nav.active {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }
    
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .nav-menu > li > a {
        padding: 15px 10px;
        font-size: 16px;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        margin-top: 0;
        display: none;
        background: var(--light-gray);
        border-radius: 0;
        padding: 5px 0;
    }
    
    .has-dropdown.active .dropdown-menu {
        display: block;
    }
    
    .dropdown-menu li a {
        padding: 12px 20px 12px 30px;
        font-size: 15px;
    }
    
    .header-cta {
        flex-direction: row; /* Side by side on mobile */
        width: auto; /* Not full width */
        gap: 5px;
        padding: 8px 15px;
        border-top: 1px solid var(--light-gray);
        justify-content: center;
    }
    
    .header-cta .btn {
        flex: 0 0 auto; /* Don't grow, stay compact */
        text-align: center;
        padding: 6px 8px; /* Reduced from 6px 10px */
        font-size: 11px;
        white-space: nowrap;
        min-width: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 3px;
    }
    
    .header-cta .btn i {
        font-size: 10px;
        margin-right: 0; /* Removed, using gap instead */
    }
    
    /* Hero Section */
    .hero-slider {
        height: 450px;
    }
    
    .slider-dots {
        bottom: 15px; /* Closer to bottom on mobile */
        padding: 8px 15px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
    
    .dot.active {
        width: 25px;
    }
    
    .hero-content h1 {
        font-size: 32px;
        margin-bottom: 15px;
    }
    
    .hero-content p {
        font-size: 16px;
        margin-bottom: 20px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 12px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        padding: 12px 24px;
        font-size: 15px;
    }
    
    /* Sections */
    section {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 32px;
    }
    
    .section-title p {
        font-size: 16px;
    }
    
    /* Service Cards */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card-content {
        padding: 20px;
    }
    
    .service-card h3 {
        font-size: 20px;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    footer {
        padding: 40px 0 20px;
    }
    
    /* WhatsApp Button */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

/* Mobile Small */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .logo-img {
        height: 50px; /* Increased from 40px for better visibility */
    }
    
    .logo-main {
        font-size: 22px;
    }
    
    .logo-sub {
        font-size: 9px;
    }
    
    .hero-slider {
        height: 350px;
    }
    
    .slider-dots {
        bottom: 12px; /* Even closer on small mobile */
        padding: 6px 12px;
        gap: 8px;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
    
    .dot.active {
        width: 20px;
    }
    
    .hero-content {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 26px;
        margin-bottom: 12px;
    }
    
    .hero-content p {
        font-size: 14px;
        margin-bottom: 18px;
    }
    
    .hero-buttons .btn {
        padding: 11px 20px;
        font-size: 14px;
    }
    
    .section-title h2 {
        font-size: 26px;
        margin-bottom: 10px;
    }
    
    .section-title p {
        font-size: 15px;
    }
    
    section {
        padding: 40px 0;
    }
    
    .service-card img {
        height: 180px;
    }
    
    .service-card-content {
        padding: 18px;
    }
    
    .service-card h3 {
        font-size: 18px;
    }
    
    .service-card p {
        font-size: 14px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .footer-section h3 {
        font-size: 18px;
        margin-bottom: 15px;
    }
    
    .footer-section ul li {
        margin-bottom: 8px;
        font-size: 14px;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

/* Mobile Extra Small */
@media (max-width: 360px) {
    .logo-img {
        height: 35px;
    }
    
    .logo-main {
        font-size: 20px;
    }
    
    .logo-sub {
        font-size: 8px;
    }
    
    .hero-content h1 {
        font-size: 24px;
    }
    
    .section-title h2 {
        font-size: 24px;
    }
    
    .header-cta .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
}

/* Landscape Orientation - Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-slider {
        height: 300px;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content p {
        font-size: 14px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .nav-menu > li > a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .dropdown-menu li a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}