/* Matules Modern Theme */
:root {
    --primary-color: #52b7a5;
    --primary-dark: #3a9182;
    --primary-blue: #233666;
    --secondary-color: #2c3e50;
    --accent-color: #ef837b;
    --light-bg: #f8f9fa;
    --dark-bg: #343a40;
    --text-main: #333333;
    --text-light: #777777;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --border-radius-base: 8px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
}

body {
    font-family: var(--font-body);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    font-weight: 700;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary-dark);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline-light {
    border-width: 2px;
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
}

.btn-outline-light:hover {
    background-color: #fff;
    color: var(--primary-color);
}

/* Header */
.navbar {
    padding: 15px 0;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.navbar-brand img {
    height: 40px;
}

.nav-link {
    font-weight: 600;
    color: var(--secondary-color) !important;
    margin-left: 15px;
    font-size: 0.95rem;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link.active {
    position: relative;
    font-weight: 700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 15px;
    right: 15px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
}

/* Hero Section */
.hero-slider .carousel-item {
    height: 85vh;
    /* Large impactful height */
    min-height: 600px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    /* Slight dark overlay */
    display: flex;
    align-items: center;
}

.hero-content {
    color: #fff;
    max-width: 700px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    color: #FFFFFF;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* Tracking Section (Floating) */
.tracking-bar-section {
    position: relative;
    margin-top: -60px;
    z-index: 100;
    margin-bottom: 80px;
}

.tracking-box {
    background: #fff;
    padding: 40px;
    border-radius: var(--border-radius-base);
    box-shadow: var(--shadow-lg);
}

.tracking-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.form-control-lg {
    height: 55px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.form-control-lg:focus {
    box-shadow: none;
    border-color: var(--primary-color);
}

/* Services Section */
.service-card {
    background: #fff;
    padding: 40px 30px;
    border-radius: var(--border-radius-base);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    text-align: center;
    border: 1px solid #f0f0f0;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    display: inline-block;
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* About Section */
.about-section {
    background-color: var(--light-bg);
}

.about-img {
    border-radius: var(--border-radius-base);
    box-shadow: var(--shadow-md);
}

/* Features */
.feature-box {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.feature-icon-circle {
    width: 60px;
    height: 60px;
    background: rgba(82, 183, 165, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-right: 20px;
    flex-shrink: 0;
}

/* Stats Counter */
.counter-section {
    background: var(--secondary-color);
    color: #fff;
    padding: 80px 0;
}

.counter-item h2 {
    color: var(--primary-color);
    font-size: 3rem;
    margin-bottom: 5px;
}

.counter-item p {
    color: #ccc;
    font-size: 1.1rem;
}

/* Footer */
.footer-modern {
    background: #222;
    color: #bbb;
    padding-top: 80px;
}

.footer-logo {
    margin-bottom: 25px;
    filter: brightness(0) invert(1);
    /* Make logo white if it's black */
}

.footer-title {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #bbb;
    transition: 0.3s;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    background: #1a1a1a;
    padding: 25px 0;
    margin-top: 60px;
    font-size: 0.9rem;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-slider .carousel-item {
        height: auto;
        padding: 100px 0;
        background-color: var(--secondary-color);
    }

    .hero-slider .carousel-control-prev,
    .hero-slider .carousel-control-next {
        display: none !important;
    }

    .tracking-bar-section {
        margin-top: 30px;
        margin-bottom: 50px;
        padding: 0 15px;
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        margin-top: 10px;
        transition: height 0.35s ease;
    }

    .navbar-collapse .navbar-nav {
        background: #fff;
        padding: 20px;
        border-radius: 10px;
        box-shadow: var(--shadow-lg);
    }

    .pagination .page-link {
        padding: 0.375rem 0.5rem;
        font-size: 0.875rem;
    }
}

/* Mobile Header State */
@media (max-width: 991px) {
    .navbar {
        transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    .navbar-brand img,
    .navbar-toggler-icon,
    .navbar-toggler {
        transition: filter 0.3s ease, border-color 0.3s ease;
    }

    .navbar.mobile-top-state {
        background-color: var(--secondary-color) !important;
    }

    .navbar.mobile-top-state .navbar-brand img {
        filter: brightness(0) invert(1);
    }

    .navbar.mobile-top-state .navbar-toggler-icon {
        filter: brightness(0) invert(1);
    }

    .navbar.mobile-top-state .navbar-toggler {
        border-color: rgba(255, 255, 255, 0.5);
    }

    /* Toggler icon has a background image by default in bootstrap, 
       inverting brightness handles black to white accurately. */
}

/* Custom Floating Flash Messages */
.modern-flash-container {
    position: fixed;
    top: 90px; /* Below the header */
    right: 24px;
    z-index: 1090;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    width: calc(100% - 48px);
}

.modern-flash {
    pointer-events: auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
    border-left: 6px solid var(--primary-color);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    animation: slideInRight 0.4s cubic-bezier(0.16, 1, 0.3, 1), fadeOut 0.5s ease 6s forwards;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    border-right: 1px solid rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.modern-flash.flash-error {
    border-left-color: #ef837b;
}

.modern-flash.flash-warning {
    border-left-color: #f39c12;
}

.modern-flash.flash-info {
    border-left-color: #3498db;
}

.modern-flash-icon {
    font-size: 1.25rem;
    margin-right: 14px;
    flex-shrink: 0;
}

.modern-flash-content {
    flex-grow: 1;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--secondary-color);
    line-height: 1.4;
}

.modern-flash-close {
    background: transparent;
    border: none;
    color: #a0aec0;
    font-size: 1.1rem;
    padding: 0 0 0 10px;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.modern-flash-close:hover {
    color: #4a5568;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%) translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateX(0) translateY(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
        pointer-events: none;
    }
}

/* Client Notification Module Styles */
.notif-btn {
    position: relative;
    background: rgba(82, 183, 165, 0.1);
    color: var(--secondary-color);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.notif-btn:hover, .notif-btn:focus, .show > .notif-btn {
    background: var(--primary-color);
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(82, 183, 165, 0.35);
}

.notif-badge-count {
    position: absolute;
    top: -2px;
    right: -2px;
    background: #ef837b;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.22em 0.55em;
    border-radius: 50rem;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(239, 131, 123, 0.4);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.notif-menu {
    width: 360px;
    max-width: calc(100vw - 24px);
    padding: 0;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    margin-top: 10px !important;
}

.notif-header {
    background: #ffffff;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notif-header h6 {
    font-size: 0.95rem;
    margin: 0;
    color: var(--secondary-color);
    font-weight: 700;
}

.notif-mark-all {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    transition: color 0.2s ease;
}

.notif-mark-all:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.notif-list {
    max-height: 340px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.notif-list::-webkit-scrollbar {
    width: 5px;
}
.notif-list::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.notif-item {
    padding: 14px 18px;
    border-bottom: 1px solid #f6f6f6;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: background-color 0.2s ease;
    cursor: pointer;
    position: relative;
}

.notif-item:hover {
    background-color: #f8fafc;
}

.notif-item.unread {
    background-color: rgba(82, 183, 165, 0.06);
}

.notif-item.unread:hover {
    background-color: rgba(82, 183, 165, 0.1);
}

.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(82, 183, 165, 0.15);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.notif-item.unread .notif-icon {
    background: var(--primary-color);
    color: #ffffff;
}

.notif-body {
    flex: 1;
    min-width: 0;
}

.notif-msg {
    font-size: 0.85rem;
    color: var(--secondary-color);
    line-height: 1.4;
    margin-bottom: 4px;
    word-break: break-word;
}

.notif-time {
    font-size: 0.72rem;
    color: #888888;
}

.notif-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    flex-shrink: 0;
    margin-top: 6px;
}

.notif-empty {
    padding: 35px 20px;
    text-align: center;
    color: #a0aec0;
}

.notif-empty i {
    font-size: 2.2rem;
    margin-bottom: 10px;
    opacity: 0.4;
}

.notif-empty p {
    font-size: 0.88rem;
    margin: 0;
}

.notif-footer {
    background: #f8fafc;
    padding: 10px 16px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
}

.notif-footer a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--secondary-color);
}
.notif-footer a:hover {
    color: var(--primary-color);
}

.navbar.mobile-top-state .notif-btn {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}
.navbar.mobile-top-state .notif-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
}

@media (max-width: 991.98px) {
    .notif-dropdown-wrapper .notif-menu {
        position: fixed !important;
        top: 68px !important;
        left: 15px !important;
        right: 15px !important;
        width: auto !important;
        max-width: 450px !important;
        margin: 0 auto !important;
        transform: none !important;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25) !important;
        border-radius: 18px !important;
        z-index: 1065 !important;
    }

    .notif-list {
        max-height: 55vh;
    }
}

@media (min-width: 992px) {
    .notif-dropdown-wrapper:hover .notif-menu {
        display: block;
        animation: fadeInDown 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
