/* General Styling & Variables */
/* Root variables defining primary colors, font colors, backgrounds, shadows, and accents */
:root {
    --primary-blue: #1A3C6B;
    --header-blue: #2F599A;
    --sidebar-bg: #FFFFFF;
    --content-bg: #F4F7FC;
    --font-color-dark: #333;
    --font-color-light: #FFFFFF;
    --active-color: #3B82F6;
    --border-color: #E5E7EB;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --whatsapp-green: #25D366;
    --gold: #f4c542;
    --grey-bg: #f8f8f8;
}

/* Dark Mode Variables - override root variables for dark theme */
body[data-theme="dark"] {
    --primary-blue: #1E293B;
    --header-blue: #334155;
    --sidebar-bg: #1A233A;
    --content-bg: #111827;
    --font-color-dark: #E5E7EB;
    --font-color-light: #F9FAFB;
    --active-color: #60A5FA;
    --border-color: #374151;
    --grey-bg: #1F2937;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Base Body Styling */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: var(--content-bg);
    color: var(--font-color-dark);
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s;
}

/* Main container is flex column to fill viewport height */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Hide the h1 inside main-content for UI purposes */
#main-content h1 {
    display: none;
}

/* Header Styling */
.header {
    background-color: var(--header-blue);
    color: var(--font-color-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
}

/* Left section of header: contains menu toggle and logo */
.header-left {
    display: flex;
    align-items: center;
}

/* Menu icon styling */
.icon-menu {
    cursor: pointer;
    margin-right: 10px;
    color: white;
    height: 40px;
    width: 40px;
}

/* Logo circle with background image */
.logo {
    width: 70px;
    height: 70px;
    background-color: #fff;
    border-radius: 50%;
    background-image: url('/men/photo/logo.jpg');
    background-size: cover;
    background-position: center;
    margin-left: 50px;
}

/* Right section of header: wallet icon and user profile */
.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* User profile layout with spacing */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* User avatar style (circle background) */
.user-avatar {
    width: 40px;
    height: 40px;
    background-color: #B0C4DE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User info: stacked vertically */
.user-info {
    display: flex;
    flex-direction: column;
}

/* User name styling */
.user-name {
    font-weight: 600;
    font-size: 14px;
}

/* User role styling with opacity */
.user-role {
    font-size: 12px;
    opacity: 0.8;
}

/* Main content container holds sidebar and page content */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Dark Mode Toggle Switch Styling */
/* Container for the switch */
.switch {
    position: relative;
    display: inline-block;
    width: 65px;
    height: 34px;
}

/* Hide native input checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider container - looks like toggle track */
.slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background: #000000;
    transition: 0.5s;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    font-size: 16px;
    overflow: hidden;
}

/* Circular toggle handle */
.slider:before {
    content: "";
    position: absolute;
    height: 28px;
    width: 28px;
    left: 3px;
    bottom: 3px;
    background: #000000;
    transition: 0.5s;
    border-radius: 50%;
    z-index: 1;
}

/* Label text for toggle */
.toggle-label {
    position: relative;
    top: 5px;
    font-size: 25px;
    font-weight: bold;
}

/* Icon styles inside slider */
.icon {
    z-index: 2;
    font-size: 16px;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
    line-height: 1;
}

/* Sun icon default visible */
.sun {
    color: #fdd835;
    opacity: 1;
    transform: scale(1);
}

/* Moon icon default less visible */
.moon {
    color: #ffffff;
    opacity: 0.5;
    transform: scale(0.75);
}

/* Checked state background of slider */
input:checked + .slider {
    background: #e8eaec;
}

/* Move toggle handle to right on checked */
input:checked + .slider:before {
    transform: translateX(31px);
}

/* Sun icon dimmed when checked */
input:checked + .slider .sun {
    opacity: 0.35;
    transform: scale(0.75);
}

/* Moon icon bright and larger when checked */
input:checked + .slider .moon {
    opacity: 1;
    transform: scale(1.1);
}

/* Sidebar Styling */
.sidebar {
    width: 260px;
    background-color: var(--sidebar-bg);
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
    transition: width 0.3s ease, left 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Sidebar header including title and close button */
.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
}

/* Sidebar title */
.sidebar-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--font-color-dark);
}

/* Close button for smaller devices, shown hidden by default */
.close-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--font-color-dark);
}

/* Sidebar when collapsed: narrow width */
.sidebar.collapsed {
    width: 80px;
}

/* Hide text labels in collapsed sidebar */
.sidebar.collapsed .nav-menu span,
.sidebar.collapsed .sidebar-header h3,
.sidebar.collapsed .dark-mode-toggle {
    display: none;
}

/* Center icons in collapsed sidebar */
.sidebar.collapsed .nav-menu li a {
    justify-content: center;
}

/* Navigation menu container grows to fill sidebar */
.nav-menu {
    flex-grow: 1;
}

/* Navigation list resets */
.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

/* Nav menu links styling */
.nav-menu li a {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: var(--font-color-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    gap: 15px;
    white-space: nowrap;
}

/* Active or hovered menu item styles */
.nav-menu li.active a,
.nav-menu li a:hover {
    background-color: var(--content-bg);
    color: var(--active-color);
}

/* Focus border left highlight for active menu item */
body[data-theme="light"] .nav-menu li.active a {
    border-left: 4px solid var(--active-color);
    padding-left: 21px;
}

/* Main page content styling */
.page-content {
    flex-grow: 1;
    padding: 25px;
    overflow-y: auto;
}

/* Welcome container layout for message and back button */
.welcome-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Welcome message font styling */
.welcome-message {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* Back button styling with background and hover */
.back-button {
    background-color: var(--primary-blue);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-button:hover {
    background-color: var(--header-blue);
}

/* Scrolling banner container */
.scrolling-banner {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 25px;
    scrollbar-width: none; /* Firefox */
}

/* Hide scrollbar in Webkit browsers */
.scrolling-banner::-webkit-scrollbar {
    display: none;
}

/* Banner item styles including shadows and border radius */
.banner-item {
    flex-shrink: 0;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Banner images fill height with auto width */
.banner-item img {
    height: 100%;
    width: auto;
    display: block;
}

/* Services Section */
.services-category {
    margin-top: 25px;
}

/* Services section heading style */
.services-category h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--border-color);
}

/* Services grid with responsive columns and gap */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 25px;
}

/* Individual service cards with background, border radius, padding, shadow */
.service-card {
    background-color: var(--sidebar-bg);
    border-radius: 100px;
    padding: 20px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

/* Remove underline in links inside service cards */
.services-grid a {
    text-decoration: none;
}

/* Hover effect: lift card and intensify shadow */
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(59, 130, 246, 0.3);
    border-color: var(--active-color);
}

/* Service card images sized and with hover scale effect */
.service-card img {
    height: 60%;
    width: 60%;
    margin-bottom: 15px;
    object-fit: contain;
    transition: transform 0.3s ease;
    max-width: 100%;
}

.service-card:hover img {
    transform: scale(1.1);
}

/* Service card text styling */
.service-card span {
    font-weight: 500;
    font-size: 14px;
    color: var(--font-color-dark);
    word-wrap: break-word;
    max-width: 100%;
}

/* Badge styling for positioned label on cards */
.badge {
    position: absolute;
    top: 12px;
    right: -35px;
    background: linear-gradient(45deg, #EF4444, #FF6B6B);
    color: white;
    padding: 3px 40px;
    font-size: 10px;
    font-weight: 600;
    transform: rotate(45deg);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Footer styling with gradients, shadows and layout */
footer {
    color: var(--font-color-dark);
    padding: 60px 20px 30px;
    position: relative;
    background: linear-gradient(135deg, var(--grey-bg) 40%, var(--primary-blue) 100%);
    margin-top: 40px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.footer-main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    max-width: 1200px;
    margin: auto;
    border-radius: 20px;
    box-shadow: var(--shadow);
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    padding: 40px;
    gap: 25px;
}

/* Left section in footer */
.footer-left {
    flex: 1;
    min-width: 280px;
    text-align: left;
}

/* Footer left headings styling */
.footer-left h2 {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    color: #16a34a;
}

.footer-left h4 {
    margin: 8px 0;
    font-weight: 400;
    font-size: 18px;
}

body[data-theme="light"] .footer-left h4 {
    color: #111;
}

.footer-left h3 {
    margin-top: 10px;
    color: #c0392b;
    font-weight: 600;
    font-size: 20px;
}

/* Footer center image circle with glowing border and hover effect */
.footer-image {
    flex-shrink: 0;
    text-align: center;
}

.footer-image img {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 6px solid var(--gold);
    box-shadow: 0 0 30px rgba(244, 197, 66, 0.8);
    transition: transform 0.5s ease, box-shadow 0.5s ease, filter 0.5s ease;
}

.footer-image img:hover {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 0 40px rgba(244, 197, 66, 1);
    filter: brightness(1.2);
}

/* Footer right side contact info */
.footer-right {
    flex: 1;
    min-width: 280px;
    color: var(--font-color-light);
}

.footer-right p {
    margin: 12px 0;
    font-size: 16px;
}

/* Icons in footer right */
.footer-right i {
    margin-right: 10px;
    color: var(--gold);
}

/* Footer right links styling with hover effect */
.footer-right a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.footer-right a:hover {
    color: var(--gold);
}

.footer-right a::after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    left: 0;
    bottom: -3px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.footer-right a:hover::after {
    width: 100%;
}

/* Social media icons container */
.social-icons {
    margin: 35px 0 15px;
    text-align: center;
}

/* Social icon styles with hover scaling and color changes */
.social-icons a {
    margin: 0 15px;
    font-size: 26px;
    padding: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    color: var(--font-color-light);
    transition: transform 0.3s, color 0.3s, background 0.3s;
}

.social-icons a:hover {
    transform: scale(1.2);
    color: var(--gold);
    background: rgba(0, 0, 0, 0.3);
}

/* Footer copyright text */
footer p.copy {
    font-size: 14px;
    margin-top: 10px;
    color: #eee;
    text-align: center;
}

footer p.copy a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer p.copy a:hover {
    color: #fff;
}

/* Floating Buttons Styling (WhatsApp) */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 20px;
    background-color: #25d366;
    color: white;
    font-size: 28px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    z-index: 998;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s;
    display: grid;
    place-items: center;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #1ebe5d;
}

/* Responsive Styles for tablets and smaller */
/* Medium devices (900px and below) */
@media (max-width: 900px) {
    .footer-main {
        flex-direction: column;
        text-align: center;
        padding: 30px;
    }

    .footer-left,
    .footer-right {
        text-align: center;
    }

    .footer-right {
        margin-top: 20px;
        color: var(--font-color-light);
    }

    body[data-theme="light"] .footer-right {
        color: var(--font-color-dark);
    }

    body[data-theme="light"] .footer-right a {
        color: var(--primary-blue);
    }

    .footer-main {
        background: rgba(255, 255, 255, 0.8);
    }

    body[data-theme="dark"] .footer-main {
        background: rgba(17, 24, 39, 0.8);
    }
}

/* Small devices (768px and below) adjustments */
@media (max-width: 768px) {
    /* Sidebar becomes hidden and fixed with sliding */
    .sidebar {
        position: fixed;
        left: -260px;
        z-index: 200;
        height: 100%;
        background: rgba(255, 255, 255, 0.9);
    }

    body[data-theme="dark"] .sidebar {
        background: rgba(26, 35, 58, 0.9);
    }

    .sidebar.open {
        left: 0;
    }

    .close-btn {
        display: block;
    }

    /* Hide user-info text for smaller screens */
    .header-right .user-info {
        display: none;
    }

    /* Smaller logo */
    .logo {
        width: 50px;
        height: 50px;
        margin-left: 18px;
    }

    /* Hide dark mode label on smaller screens */
    .toggle-label {
        position: relative;
        top: 5px;
        font-size: 25px;
        font-weight: bold;
        display: none;
    }

    /* Services grid 2 columns for mobile */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Service card sizing for mobile */
    .service-card {
        height: 80%;
        width: 80%;
        padding: 15px;
        min-height: 100px;
        box-sizing: border-box;
    }

    .service-card img {
        height: 70%;
        width: 70%;
        max-width: 50%;
    }

    .service-card span {
        font-size: 12px;
        word-break: break-word;
    }

    .badge {
        font-size: 9px;
        padding: 2px 30px;
        top: 10px;
        right: -30px;
        width: fit-content;
    }

    /* Page content background adjustment */
    .page-content {
        margin-left: 0 !important;
        padding: 15px;
        background: rgba(244, 247, 252, 0.95);
    }

    body[data-theme="dark"] .page-content {
        background: rgba(17, 24, 39, 0.95);
    }

    .welcome-message {
        font-size: 16px;
    }

    .banner-item {
        height: 80px;
    }
}

/* Extra small devices (480px and below) */
@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .service-card {
        height: 80%;
        width: 90%;
        padding: 19px;
        min-height: 90px;
    }

    .service-card img {
        height: 100%;
        width: 100%;
        max-width: 80%;
    }

    .service-card span {
        font-size: 10px;
    }

    .header {
        padding: 5px 29px;
    }

    .logo {
        width: 45px;
        height: 45px;
        margin-left: 20px;
    }

    .icon-menu {
        margin: 1px;
        height: 30px;
        width: 30px;
    }

    .toggle-label {
        display: none;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
    }

    .scrolling-banner {
        gap: 15px;
    }

    .banner-item {
        height: 70px;
    }

    .footer-image img {
        width: 150px;
        height: 150px;
    }

    .footer-left h2 {
        font-size: 24px;
        text-align: center;
    }

    .footer-left h3 {
        font-size: 16px;
        text-align: center;
    }

    .footer-right p {
        font-size: 14px;
        text-align: center;
    }

    .social-icons a {
        font-size: 20px;
        margin: 0 10px;
    }

    body[data-theme="dark"] {
        --font-color-dark: #E5E7EB;
    }
}

/* Smallest devices (320px and below) */
@media (max-width: 320px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .service-card {
        padding: 10px;
        min-height: 80px;
    }

    .service-card img {
        height: 60%;
        width: 60%;
        max-width: 80%;
    }

    .service-card span {
        font-size: 10px;
    }

    .page-content {
        padding: 10px;
    }

    .welcome-container {
        flex-direction: column;
        align-items: flex-start;
    }
}
