/* 
   Shar's Medical Supplies - Design System
   Core tokens and global styles
*/

.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: white;
    padding: 20px 0;
    border-bottom: 2px solid var(--color-burgundy);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header .logo img {
    height: 60px;
    transition: all 0.3s ease;
}

/* Shrinking Header Style */
.main-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.main-header.scrolled .logo img {
    height: 45px;
}

.main-header.scrolled .nav-links li a {
    font-size: 14px;
}

.main-header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.nav-links li a {
    text-decoration: none;
    color: var(--color-navy);
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.nav-links li a:hover {
    color: var(--color-burgundy);
}

.nav-links li a.active {
    color: var(--color-burgundy);
    font-weight: 700;
}

.nav-store-link {
    background: var(--color-burgundy);
    color: var(--color-white) !important;
    padding: 0.65rem 1rem;
    border-radius: 4px;
}

.nav-store-link:hover {
    background: var(--color-burgundy-light);
    color: var(--color-white) !important;
}

@import url('https://fonts.googleapis.com/css2?family=Sanchez&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Primary Brand Colors */
    --color-navy: #194D7A;
    --color-navy-light: #256BA8;
    --color-navy-dark: #123A5C;

    /* Background & Surfaces */
    --color-offwhite: #F8F9FA;
    --color-white: #FFFFFF;

    /* Accents */
    --color-burgundy: #7A191F;
    --color-burgundy-light: #A1252C;
    --color-accent: var(--color-burgundy);

    /* Semantic Colors */
    --color-text-main: #1A1A1A;
    --color-text-muted: #4A4A4A;
    --color-border: #E5E5E5;
    --color-cream: #f9f7f2;
    --color-cream-dark: #f0ede6;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 2rem;
    --space-lg: 4rem;
    --space-xl: 8rem;

    /* Transitions */
    --transition-base: all 0.3s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--color-white);
    color: var(--color-text-main);
    font-family: 'Sanchez', serif;
    font-size: 17px;
    /* Per Brief: Accessibility requirement */
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Accessibility: Standard visually-hidden class */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Typography */
h1,
h2,
h3,
.heading-serif {
    font-family: 'Sanchez', serif;
    font-weight: 700;
    color: var(--color-navy);
}

h4,
h5,
h6,
.subheading-serif {
    font-family: 'Sanchez', serif;
    font-weight: 600;
}

p,
.body-style {
    font-family: 'Sanchez', serif;
}

.text-accent {
    color: var(--color-accent);
}

.text-burgundy {
    color: var(--color-burgundy);
}

.text-navy {
    color: var(--color-navy);
}

/* Layout Utilities */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

.section {
    padding: var(--space-lg) 0;
}

/* Components */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--color-navy-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 58, 92, 0.2);
}

.btn-accent {
    background-color: var(--color-burgundy);
    color: var(--color-white);
}

.btn-accent:hover {
    background-color: var(--color-burgundy-light);
}

/* Glassmorphism Classes */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
}

/* Credential Bar Styles */
.credential-bar {
    background-color: var(--color-white);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--color-cream-dark);
}

.credential-bar .img-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    opacity: 0.7;
    filter: grayscale(1);
}

.credential-bar img:hover {
    opacity: 1;
    filter: grayscale(0);
}

/* Testimonials & Reviews */
.testimonials-section {
    background-color: #FDFBFA;
    /* Warm cream tint */
    padding: var(--space-lg) 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.testimonial-card {
    background: var(--color-white);
    padding: var(--space-md);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition-base);
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--color-burgundy-light);
}

.testimonial-stars {
    color: #F4B400;
    font-size: 1.2rem;
    margin-bottom: var(--space-sm);
}

.testimonial-text {
    font-style: italic;
    color: var(--color-text-muted);
    margin-bottom: var(--space-md);
    font-size: 16px;
    line-height: 1.7;
    flex-grow: 1;
}

.testimonial-author {
    font-weight: 700;
    color: var(--color-navy);
}

.testimonial-meta {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.google-icon {
    width: 16px;
    height: 16px;
    vertical-align: middle;
}

/* --- Partners & Logo Banner --- */
.logo-banner {
    padding: 60px 0;
    background: #f8f9fa;
    overflow: hidden;
    position: relative;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.logo-banner::before,
.logo-banner::after {
    content: "";
    position: absolute;
    top: 0;
    width: 200px;
    height: 100%;
    z-index: 2;
}

.logo-banner::before {
    left: 0;
    background: linear-gradient(to right, #f8f9fa, transparent);
}

.logo-banner::after {
    right: 0;
    background: linear-gradient(to left, #f8f9fa, transparent);
}

.logo-banner-track {
    display: flex;
    width: calc(280px * 36);
    /* 18 unique logos * 2 */
    animation: scroll 60s linear infinite;
    /* Slower for more logos */
}

.logo-banner-track:hover {
    animation-play-state: paused;
}

.logo-slide {
    width: 280px;
    /* Increased from 250px */
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.logo-slide img {
    height: 100px;
    /* Increased from 50px */
    width: auto;
    filter: none;
    /* Show full color by default */
    opacity: 0.95;
    transition: all 0.3s ease;
    max-width: 220px;
    /* Increased from 180px */
    padding: 0 10px;
    object-fit: contain;
}

.logo-slide:hover img {
    filter: none;
    opacity: 1;
    transform: scale(1.05);
    /* Subtle scale on hover */
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-280px * 18));
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .logo-banner {
        padding: 40px 0;
    }

    .logo-slide img {
        height: 35px;
    }

    .logo-banner::before,
    .logo-banner::after {
        width: 80px;
    }
}


/* Specialties Section Styles */
.specialties-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.specialty-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition-base);
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.specialty-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: var(--color-burgundy-light);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.specialty-card .icon {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.specialty-card h3 {
    margin-bottom: 15px;
    font-family: 'Sanchez', serif;
    color: var(--color-white);
}

.specialty-card p {
    color: var(--color-white);
    opacity: 1; /* Increased from 0.9 for ADA contrast */
    font-size: 15px;
    line-height: 1.5;
}

/* Ensure accent text on dark background is accessible */
.specialty-card .accent-text {
    color: #ffda79 !important; /* Accessible gold color for contrast on navy */
    font-weight: 700;
}

@media (max-width: 1200px) {
    .specialties-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .specialties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .specialties-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Dropdown Menu Styles --- */
.nav-links li {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 250px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 10px 0;
    list-style: none;
    display: none;
    z-index: 1000;
    border-top: 3px solid var(--color-burgundy);
}

.nav-links li:hover .dropdown,
.nav-links li:focus-within .dropdown {
    display: block;
    animation: fadeInSlideDown 0.3s ease forwards;
}

.dropdown li {
    margin: 0;
    width: 100%;
}

.dropdown li a {
    display: block;
    padding: 12px 25px;
    color: var(--color-navy) !important;
    font-size: 15px !important;
    text-decoration: none;
    transition: var(--transition-base);
    font-weight: 500 !important;
    text-align: left;
}

.dropdown li a:hover {
    background: #f8f9fa;
    color: var(--color-burgundy) !important;
    padding-left: 30px;
}

@keyframes fadeInSlideDown {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Dropdown Adjustments */
@media (max-width: 991px) {
    .nav-links li {
        flex-direction: column;
    }

    .dropdown {
        position: static;
        box-shadow: none;
        border: none;
        display: block !important;
        /* Always show in mobile vertical menu for simplicity */
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        padding: 0;
        text-align: center;
        background: transparent;
        width: 100%;
    }

    .dropdown li a {
        font-size: 18px !important;
        padding: 10px 0;
        text-align: center;
        opacity: 0.8;
    }
}

/* --- Responsive Navigation & Utility Bar --- */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: var(--color-burgundy);
    font-size: 1.5rem;
    z-index: 2000;
}

/* Utility Bar Desktop Layout */
.utility-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 991px) {
    body.nav-open {
        overflow: hidden;
    }

    .mobile-nav-toggle {
        display: block;
        width: 44px;
        height: 44px;
        line-height: 1;
        border-radius: 4px;
        background: var(--color-white);
    }

    .mobile-nav-toggle.active {
        position: fixed;
        top: 16px;
        right: var(--space-sm);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    }

    .nav-links {
        display: none !important;
        /* Hide defaults on mobile, override inline styles */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        z-index: 1000;
        gap: 22px !important;
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        overflow-y: auto;
        padding: 96px var(--space-sm) 120px;
    }

    .nav-links.active {
        display: flex !important;
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li {
        margin: 0;
    }

    .nav-links li a {
        font-size: 22px;
        color: var(--color-burgundy) !important;
        /* Ensure visibility */
    }

    .nav-links .nav-store-link {
        color: var(--color-white) !important;
        display: inline-block;
        min-width: 220px;
        text-align: center;
        padding: 0.85rem 1.2rem;
    }

    .utility-bar .container {
        flex-direction: column !important;
        text-align: center;
        gap: 10px;
    }

    .utility-bar .quick-links {
        margin-left: 0;
    }

    .utility-bar .quick-links a {
        margin-left: 0 !important;
    }
}

/* Utility bar quick links spacing fix */
.utility-bar .quick-links a {
    margin-left: 0 !important;
}

/* --- Responsive Utility Grids --- */
.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.b2b-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

@media (max-width: 991px) {

    .grid-2-col,
    .b2b-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
        text-align: center;
    }

    .grid-3-col {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 2.5rem !important;
    }

    .grid-3-col,
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }

    .footer-brand div {
        align-items: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

/* --- Accessibility: Dark Section High Contrast --- */
.dark-section h1,
.dark-section h2,
.dark-section h3,
.dark-section .heading-serif {
    color: var(--color-white) !important;
}

.dark-section p,
.dark-section li {
    color: var(--color-white);
    opacity: 0.9;
}

.dark-section .accent-text,
.dark-section .text-burgundy,
.dark-section span[style*="color: var(--color-burgundy)"] {
    color: #ffda79 !important; /* Branded gold for better visibility on navy */
}

.dark-section .btn-secondary {
    border-color: rgba(255, 255, 255, 0.4) !important;
    color: var(--color-white) !important;
}
