/* General Styling & Variables */
:root {
    /* Primary Colors */
    --primary-blue: #1A3C6B;
    --header-blue: #2F599A;

    /* Background Colors */
    --sidebar-bg: #FFFFFF;
    --content-bg: #F4F7FC;

    /* Font Colors */
    --font-color-dark: #333;
    --font-color-light: #FFFFFF;

    /* Highlight / Active Colors */
    --active-color: #3B82F6;

    /* Borders & Shadows */
    --border-color: #E5E7EB;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

    /* Brand Colors */
    --whatsapp-green: #25D366;
    --gold: #f4c542;

    /* Misc background */
    --grey-bg: #f8f8f8;
}

/* ====== DARK MODE VARIABLES ====== */
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 Styles */
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;
}

/* Container for Whole App: Flex column for vertical stacking */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Hide main h1 */
#main-content h1 {
    display: none;
}

/* ====== Header Section ====== */
/* Header bar container */
.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 side of header: menu button + logo */
.header-left {
    display: flex;
    align-items: center;
}

/* Icon styling for menu */
.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 side header container */
.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

/* User profile area: avatar + info */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Avatar circle style (currently unused image?) */
.user-avatar {
    width: 40px;
    height: 40px;
    background-color: #B0C4DE;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Text info container in user profile */
.user-info {
    display: flex;
    flex-direction: column;
}

/* User name text */
.user-name {
    font-weight: 600;
    font-size: 14px;
}

/* User role text */
.user-role {
    font-size: 12px;
    opacity: 0.8;
}

/* ====== Main Content Layout ====== */
/* Main container holds sidebar + page content horizontally */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ====== Dark Mode Toggle Styles ====== */
/* Switch wrapper with fixed size */
.switch {
    position: relative;
    display: inline-block;
    width: 65px;
    height: 34px;
}

/* Hide native checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Slider background style for switch */
.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;
}

/* Circle handle inside switch */
.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 next to switch */
.toggle-label {
    position: relative;
    top: 5px;
    font-size: 25px;
    font-weight: bold;
}

/* Icons on slider */
/* Sun icon */
.icon {
    z-index: 2;
    font-size: 16px;
    transition: transform 0.4s ease, opacity 0.4s ease;
    pointer-events: none;
    line-height: 1;
}
.sun {
    color: #fdd835;
    opacity: 1;
    transform: scale(1);
}
/* Moon icon */
.moon {
    color: #ffffff;
    opacity: 0.5;
    transform: scale(0.75);
}

/* Checked (dark mode) styling */
input:checked + .slider {
    background: #e8eaec;
}
input:checked + .slider:before {
    transform: translateX(31px);
}
input:checked + .slider .sun {
    opacity: 0.35;
    transform: scale(0.75);
}
input:checked + .slider .moon {
    opacity: 1;
    transform: scale(1.1);
}

/* ====== Sidebar Styles ====== */
/* Sidebar container fixed width and vertical layout */
.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 - title + 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 styling */
.sidebar-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--font-color-dark);
}

/* Close button (hidden by default for larger screens) */
.close-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--font-color-dark);
}

/* Collapsed sidebar smaller width */
.sidebar.collapsed {
    width: 80px;
}

/* Hide text in collapsed sidebar */
.sidebar.collapsed .nav-menu span,
.sidebar.collapsed .sidebar-header h3,
.sidebar.collapsed .dark-mode-toggle {
    display: none;
}

/* Center icons only when collapsed */
.sidebar.collapsed .nav-menu li a {
    justify-content: center;
}

/* Navigation Menu container */
.nav-menu {
    flex-grow: 1;
}

/* Navigation links list */
.nav-menu ul {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

/* Navigation item links */
.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 hover state */
.nav-menu li.active a,
.nav-menu li a:hover {
    background-color: var(--content-bg);
    color: var(--active-color);
}

/* Active link left border in light theme */
body[data-theme="light"] .nav-menu li.active a {
    border-left: 4px solid var(--active-color);
    padding-left: 21px;
}

/* ====== Page Content Styling ====== */
/* Main content area flex grow fills remaining space */
.page-content {
    flex-grow: 1;
    padding: 25px;
    overflow-y: auto;
}

/* ====== Welcome Area ====== */
.welcome-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Welcome message text */
.welcome-message {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* Back button style */
.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 Style ====== */
/* Horizontal scroll banner container */
.scrolling-banner {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    margin-bottom: 25px;
    scrollbar-width: none;
}

/* Hide scrollbar for Chrome/Safari/Edge */
.scrolling-banner::-webkit-scrollbar {
    display: none;
}

/* Each banner card style */
.banner-item {
    flex-shrink: 0;
    height: 100px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Banner image scaling */
.banner-item img {
    height: 100%;
    width: auto;
    display: block;
}

/* ====== Services Section ====== */
.services-category {
    margin-top: 25px;
}

.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 layout with auto-fill */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 25px; /* Spacing between cards */
}

/* Individual service card styling */
.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;

    /* Flex box to center content */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px; /* Prevent collapsing */
}

/* Remove underline on links inside services grid */
.services-grid a {
    text-decoration: none;
}

/* Hover effects on cards */
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 20px rgba(59, 130, 246, 0.3);
    border-color: var(--active-color);
}

/* Images inside service cards */
.service-card img {
    height: 60px;
    margin-bottom: 15px;
    object-fit: contain; /* Maintain aspect ratio */
    transition: transform 0.3s ease;
    max-width: 100%;
}

/* Zoom image on hover */
.service-card:hover img {
    transform: scale(1.1);
}

/* Text below icons */
.service-card span {
    font-weight: 500;
    font-size: 14px;
    color: var(--font-color-dark);
    word-wrap: break-word;
    max-width: 100%;
}

/* Badge styling for any ribbon/stickers */
.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 Styles ====== */
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 container for flex layout */
.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 side footer text content */
.footer-left {
    flex: 1;
    min-width: 280px;
    text-align: left;
}

/* Footer left headings */
.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;
}

/* Light mode color override */
body[data-theme="light"] .footer-left h4 {
    color: #111;
}

.footer-left h3 {
    margin-top: 10px;
    color: #c0392b;
    font-weight: 600;
    font-size: 20px;
}

/* Footer image area with circular photo */
.footer-image {
    flex-shrink: 0;
    text-align: center;
}

/* Footer image styling with border and shadow */
.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;
}

/* Hover effect for glow and rotation on footer image */
.footer-image img:hover {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 0 40px rgba(244, 197, 66, 1);
    filter: brightness(1.2);
}

/* Right side footer text links */
.footer-right {
    flex: 1;
    min-width: 280px;
    color: var(--font-color-light);
}

/* Footer right paragraphs styling */
.footer-right p {
    margin: 12px 0;
    font-size: 16px;
}

/* Icons before links */
.footer-right i {
    margin-right: 10px;
    color: var(--gold);
}

/* Footer links color and style */
.footer-right a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

/* Link hover color change */
.footer-right a:hover {
    color: var(--gold);
}

/* Underline transition on hover */
.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 icons container */
.social-icons {
    margin: 35px 0 15px;
    text-align: center;
}

/* Individual social icons style */
.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 icon hover scale and color change */
.social-icons a:hover {
    transform: scale(1.2);
    color: var(--gold);
    background: rgba(0, 0, 0, 0.3);
}

/* Copyright text style */
footer p.copy {
    font-size: 14px;
    margin-top: 10px;
    color: #eee;
    text-align: center;
}

/* Link inside copyright */
footer p.copy a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

/* Hover color change for copy link */
footer p.copy a:hover {
    color: #fff;
}

/* ====== Floating Buttons (WhatsApp) ====== */
/* WhatsApp floating button fixed position */
.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;
}

/* Hover effect for WhatsApp button */
.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #1ebe5d;
}

/* ====== Responsive Styles ====== */

/* Up to 900px width */
@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);
    }

    /* Light theme override */
    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);
    }
}

/* Up to 768px width */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -260px;
        z-index: 200;
        height: 100%;
        background: rgba(255, 255, 255, 0.9);
    }

    /* Dark mode background override */
    body[data-theme="dark"] .sidebar {
        background: rgba(26, 35, 58, 0.9);
    }

    /* Sidebar open state */
    .sidebar.open {
        left: 0;
    }

    .close-btn {
        display: block;
    }

    .header-right .user-info {
        display: none;
    }

    .logo {
        width: 50px;
        height: 50px;
        margin-left: 18px;
    }

    /* Hide dark mode label (toggle) on small screens */
    .toggle-label {
        position: relative;
        top: 5px;
        font-size: 25px;
        font-weight: bold;
        display: none;
    }

    /* Services grid 2 columns on tablet */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .service-card {
        padding: 15px;
        min-height: 100px;
        box-sizing: border-box;
    }

    .service-card img {
        height: 50px;
        margin-bottom: 10px;
        max-width: 80%;
    }

    .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 {
        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;
    }
}

/* Up to 480px width */
@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .service-card {
        padding: 19px;
        min-height: 90px;
    }

    .service-card img {
        height: 45px;
        max-width: 80%;
    }

    .service-card span {
        font-size: 13px;
    }

    .header {
        padding: 5px 29px;
    }

    .logo {
        width: 45px;
        height: 45px;
        margin-left: 20px;
    }

    .icon-menu {
        margin: 1px;
        height: 30px;
        width: 30px;
    }

    .toggle-label {
        position: relative;
        top: 5px;
        font-size: 25px;
        font-weight: bold;
        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;
    }
}

/* Up to 320px width */
@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: 35px;
        max-width: 60%;
    }

    .service-card span {
        font-size: 10px;
    }

    .page-content {
        padding: 10px;
    }

    .welcome-container {
        flex-direction: column;
        align-items: flex-start;
    }
}
