/* Project: Delivery Express Cargo 
   File: ./css/style.css
   Description: Corrected version to fix image cropping and layout distortion
*/

:root {
    --primary: #0B3C91; /* Cargo Blue */
    --secondary: #F97316; /* Action Orange */
    --accent: #E8F1FF;
    --text-dark: #0F172A;
    --text-light: #64748B;
    --white: #ffffff;
    --border: #E2E8F0;
    --stars: #F59E0B;
}

* { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; }
body { 
    font-family: 'Inter', -apple-system, system-ui, sans-serif; 
    color: var(--text-dark); 
    line-height: 1.6; 
    background: #fff; 
}

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section { padding: 80px 0; }
.bg-light { background: #F8FAFC; }

/* --- Navigation & Header --- */
header { 
    background: var(--white); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); 
}
.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    height: 85px; 
}

/* Logo fix: Ensures it scales but stays within your desired height */
.logo img { 
    height: 70px; /* Slightly reduced for better padding */
    width: auto; 
    display: block; 
    max-width: 100%;
}

.main-nav { display: flex; gap: 20px; list-style: none; align-items: center; }
.main-nav a { 
    text-decoration: none; 
    color: var(--text-dark); 
    font-weight: 600; 
    font-size: 0.95rem; 
    transition: 0.3s; 
}
.main-nav a:hover { color: var(--primary); }

/* --- Mobile Menu Button --- */
.mobile-menu-btn {
    display: none; 
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
    z-index: 1100;
}
.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
    transition: 0.3s ease;
}

/* --- Hero Section --- */
.hero { 
    background: linear-gradient(rgba(11, 60, 145, 0.85), rgba(11, 60, 145, 0.85)), url('../images/home-shifting.jpg'); 
    background-size: cover; 
    background-position: center; 
    color: var(--white); 
    padding: 80px 0; 
}
.hero-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }
.hero-text h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.2; margin-bottom: 20px; }
.hero-card { 
    background: var(--white); 
    padding: 30px; 
    border-radius: 12px; 
    color: var(--text-dark); 
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); 
}

/* --- IMAGE FIXES (THE CRITICAL PART) --- */

/* Fixed the 'About Us' image to prevent distortion */
.about-image img {
    width: 100%;
    height: auto; 
    border-radius: 12px;
    display: block;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Fixed Service Cards: Removed 'height: 280px' which was causing cropping */
.service-card img {
    width: 100%;
    height: auto; /* This ensures the full image is shown */
    aspect-ratio: 1 / 1; /* Maintains a clean square look if your images are square */
    object-fit: contain; /* Prevents text from being cut off */
    background: #fdfdfd; /* Fills empty space if image ratio is different */
    display: block;
}

/* --- Grid System --- */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.service-card { 
    background: #fff; 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    overflow: hidden; 
    transition: 0.3s ease; 
}
.service-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.service-body { padding: 25px; }

/* --- Review Section Styling --- */
.stars { color: var(--stars); letter-spacing: 1px; }
.review-summary { 
    border: 1px solid var(--border); 
    border-radius: 12px; 
    padding: 2.5rem; 
    background: var(--white); 
}
.summary-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 2rem; align-items: center; }
.bar-track { height: 10px; background: #eee; border-radius: 10px; overflow: hidden; margin: 8px 0; }
.bar-fill { height: 100%; background: var(--primary); }

/* --- Responsive Layout --- */
@media (max-width: 900px) {
    .hero-grid, .summary-grid { grid-template-columns: 1fr !important; }
    .mobile-menu-btn { display: flex; }
    
    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: #fff;
        flex-direction: column;
        justify-content: center;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        transition: 0.4s ease;
    }
    .main-nav.nav-active { right: 0; }
    .about-image { margin-bottom: 20px; }
}

/* --- Forms & UI --- */
.form-group { margin-bottom: 15px; }
.form-input { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid var(--border); 
    border-radius: 6px; 
    font-family: inherit; 
}
.btn-submit { 
    width: 100%; 
    padding: 15px; 
    background: var(--secondary); 
    color: #fff; 
    border: none; 
    border-radius: 6px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: 0.3s; 
}
.btn-submit:hover { background: #EA580C; }
/* --- Floating Contact Buttons --- */
.fab-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.fab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 50px;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: 0.3s ease;
    font-weight: 600;
    min-width: 50px;
    height: 50px;
}

/* Icons inside buttons */
.fab-btn i {
    font-size: 24px;
}

/* Hide text by default (shows only icon on mobile) */
.fab-btn span {
    display: none;
    margin-left: 10px;
}

/* WhatsApp Color */
.fab-whatsapp {
    background-color: #25D366;
}

/* Call Color (Using your brand primary blue) */
.fab-call {
    background-color: var(--primary);
}

.fab-btn:hover {
    transform: scale(1.1);
    color: #fff;
}

/* Desktop View: Show labels on hover or wide screens */
@media (min-width: 768px) {
    .fab-btn {
        padding: 12px 20px;
        height: auto;
    }
    .fab-btn span {
        display: inline-block;
    }
}