/**
 * Triple M Cargo and Logistics Services
 * Main Stylesheet
 * Color Palette: Deep Purple (#4A148C) & Vibrant Pink (#E91E63)
 */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    --primary-color: #4A148C;
    --primary-dark: #311B92;
    --primary-light: #7C4DFF;
    --secondary-color: #E91E63;
    --secondary-dark: #C2185B;
    --secondary-light: #F48FB1;
    --accent-color: #FFFFFF;
    --text-dark: #1A1A2E;
    --text-light: #6B7280;
    --bg-light: #F8F9FA;
    --bg-gradient: linear-gradient(135deg, #4A148C 0%, #7B1FA2 50%, #E91E63 100%);
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

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

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

/* ============================================
   UTILITY CLASSES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none !important; }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 8px;
}

.btn-primary {
    background: var(--bg-gradient);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

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

.btn-pink:hover {
    background: var(--secondary-dark);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

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

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

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

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
.header {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between; /* Puts logo on left, buttons on right */
    align-items: center;           /* Vertically centers everything */
    padding: 10px 20px;
    background-color: #fff;        /* Matches the logo background */
}

.logo-img {
    display: block;
    height: 50px;                  /* Adjust this to make the logo bigger or smaller */
    width: auto;                   /* Maintains aspect ratio */
    object-fit: contain;
}

.nav-controls {
    display: flex;
    gap: 10px;                     /* Space between buttons */
    align-items: center;
}
.header-content {
    display: flex;
    align-items: center;
    padding: 10px 0;
}


.logo-text span {
    font-size: 12px;
    color: var(--secondary-color);
    font-weight: 600;
    letter-spacing: 1px;
}

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

.nav-menu a {
    font-weight: 600;
    color: var(--text-dark);
    position: relative;
    padding: 5px 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bg-gradient);
    transition: var(--transition);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary-color);
    cursor: pointer;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    background: var(--bg-gradient);
    padding: 80px 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
    background-size: 100px 100px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 48px;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.95;
}

/* Tracking Box */
.tracking-box {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-top: 40px;
}

.tracking-box h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 22px;
}

.tracking-form {
    display: flex;
    gap: 15px;
}

.tracking-input {
    flex: 1;
    padding: 16px 24px;
    border: 2px solid #E5E7EB;
    border-radius: 50px;
    font-size: 16px;
    transition: var(--transition);
}

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

.tracking-input::placeholder {
    color: var(--text-light);
}

/* ============================================
   SECTIONS
   ============================================ */
.section {
    padding: 80px 0;
}

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

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-header p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

.section-header .subtitle {
    display: inline-block;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 14px;
    margin-bottom: 10px;
}

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

.service-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #E5E7EB;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: var(--bg-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 36px;
    color: white;
}

.service-card h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ============================================
   COVERAGE SECTION
   ============================================ */
.coverage-section {
    background: var(--bg-gradient);
    color: white;
    padding: 80px 0;
}

.coverage-section .section-header h2,
.coverage-section .section-header p {
    color: white;
}

.coverage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.coverage-item {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 25px 20px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.2);
}

.coverage-item:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-5px);
}

.coverage-item .flag {
    font-size: 40px;
    margin-bottom: 10px;
}

.coverage-item h4 {
    font-size: 16px;
    font-weight: 600;
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--primary-color);
}

.stat-card.pink-border {
    border-left-color: var(--secondary-color);
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    background: var(--bg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-label {
    color: var(--text-light);
    font-weight: 600;
}

/* ============================================
   TRACKING RESULTS
   ============================================ */
.tracking-result {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-md);
    margin-top: 30px;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E5E7EB;
}

.tracking-number-display {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-color);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    color: white;
}

.status-badge.pending { background: #F59E0B; }
.status-badge.in_transit { background: #3B82F6; }
.status-badge.out_for_delivery { background: #F97316; }
.status-badge.delivered { background: #10B981; }
.status-badge.cancelled { background: #EF4444; }
.status-badge.on_hold { background: #6B7280; }

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -26px;
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--bg-gradient);
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

.timeline-item.active .timeline-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.timeline-content {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--border-radius);
}

.timeline-date {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.timeline-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.timeline-location {
    font-size: 14px;
    color: var(--text-light);
}

/* ============================================
   DASHBOARD
   ============================================ */
.dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: calc(100vh - 80px);
}

.sidebar {
    background: var(--primary-color);
    color: white;
    padding: 30px 20px;
}

.sidebar-logo {
    text-align: center;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-bottom: 30px;
}

.sidebar-logo h2 {
    font-size: 20px;
    margin-bottom: 5px;
}

.sidebar-logo span {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 10px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.15);
}

.sidebar-menu i {
    font-size: 20px;
    width: 24px;
}

.main-content {
    background: var(--bg-light);
    padding: 30px;
    overflow-y: auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.dashboard-header h1 {
    font-size: 28px;
    color: var(--primary-color);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: var(--bg-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
}

.dashboard-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.dashboard-card-icon.purple {
    background: rgba(74, 20, 140, 0.1);
    color: var(--primary-color);
}

.dashboard-card-icon.pink {
    background: rgba(233, 30, 99, 0.1);
    color: var(--secondary-color);
}

.dashboard-card-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
}

.dashboard-card-icon.blue {
    background: rgba(59, 130, 246, 0.1);
    color: #3B82F6;
}

.dashboard-card-info h3 {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-dark);
}

.dashboard-card-info p {
    color: var(--text-light);
    font-size: 14px;
}

/* Data Table */
.data-table-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.data-table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.data-table-header h3 {
    font-size: 20px;
    color: var(--primary-color);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #E5E7EB;
}

.data-table th {
    font-weight: 700;
    color: var(--primary-color);
    background: var(--bg-light);
}

.data-table tr:hover {
    background: var(--bg-light);
}

.table-actions {
    display: flex;
    gap: 8px;
}

.table-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.btn-view {
    background: #3B82F6;
    color: white;
}

.btn-edit {
    background: #F59E0B;
    color: white;
}

.btn-delete {
    background: #EF4444;
    color: white;
}

/* ============================================
   FORMS
   ============================================ */
.form-container {
    max-width: 500px;
    margin: 0 auto;
    background: white;
    border-radius: var(--border-radius);
    padding: 40px;
    box-shadow: var(--shadow-md);
}

.form-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.form-container .subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #E5E7EB;
    border-radius: 10px;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-footer {
    text-align: center;
    margin-top: 25px;
    color: var(--text-light);
}

.form-footer a {
    color: var(--secondary-color);
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.contact-info-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info-card p {
    color: var(--text-light);
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.contact-info-card i {
    color: var(--secondary-color);
    margin-top: 3px;
}

.office-locations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.office-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--primary-color);
}

.office-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 18px;
}

.office-card p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
}

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

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: white;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-brand .cert-info {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
    font-size: 13px;
}

.footer-brand .cert-info p {
    margin-bottom: 5px;
    font-size: 13px;
}

.footer-column h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--secondary-light);
}

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

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: rgba(255,255,255,0.7);
    transition: var(--transition);
}

.footer-column a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 14px;
}

/* ============================================
   FLASH MESSAGES
   ============================================ */
.flash-message {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-message.success {
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.flash-message.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.flash-message.warning {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.flash-message.info {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 1024px) {
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        display: none;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 16px;
    }
    
    .tracking-form {
        flex-direction: column;
    }
    
    .section-header h2 {
        font-size: 28px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .tracking-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .tracking-box {
        padding: 20px;
    }
    
    .service-card {
        padding: 30px 20px;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #E5E7EB;
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
