/* Custom Styles for Medical Store Website */

:root {
    --primary-color: #4caf50;
    --secondary-color: #198754;
    --dark-color: #212529;
    --light-bg: #f8f9fa;
    --font-heading: 'Inter', sans-serif;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--dark-color);
}

/* Bootstrap Overrides for Primary Color */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

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

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #388e3c;
    /* Darker shade for hover */
    border-color: #388e3c;
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Navbar */
.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color);
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    padding: 150px 0;
    background: linear-gradient(rgba(34, 34, 34, 0.7), rgba(34, 34, 34, 0.7)), url('hero_bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 80vh;
}

/* Buttons */
.btn {
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    animation: fadeInUp 0.8s ease-out both;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.feature-card:hover .icon-box {
    animation: pulse 1s infinite;
}

/* Staggered Animation Delays for Feature Cards */
.row .col-md-4:nth-child(1) .feature-card {
    animation-delay: 0.1s;
}

.row .col-md-4:nth-child(2) .feature-card {
    animation-delay: 0.3s;
}

.row .col-md-4:nth-child(3) .feature-card {
    animation-delay: 0.5s;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
    }
}

/* Category Cards */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Icons */
.icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* Testimonials */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-size: 50%, 50%;
}

/* Footer */
footer a {
    text-decoration: none;
    transition: opacity 0.3s ease;
}

footer a:hover {
    opacity: 0.8;
}

/* Scroll to Top Button */
#scrollToTopBtn {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99;
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

#scrollToTopBtn:hover {
    transform: translateY(-5px);
    background-color: var(--secondary-color) !important;
    /* Ensure it overrides any specific styles */
    border-color: var(--secondary-color) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        padding: 60px 0;
        text-align: center;
    }


    .hero-section .d-flex {
        justify-content: center;
    }
}

/* Testimonials Scroll */
.testimonial-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 1.5rem;
    padding-bottom: 1rem;
    -webkit-overflow-scrolling: touch;
    /* For smooth iOS scrolling */
    scrollbar-width: none;
    /* Firefox */
}

.testimonial-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari/Opera */
}

.testimonial-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
}

@media (min-width: 768px) {
    .testimonial-item {
        flex: 0 0 calc(33.333% - 1rem);
        /* 3 items per row minus gap compensation */
        scroll-snap-align: start;
    }
}

.testimonial-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--primary-color);
}

.testimonial-arrow:hover {
    background-color: var(--primary-color);
    color: white;
}

.testimonial-prev {
    left: -20px;
}

.testimonial-next {
    right: -20px;
}

@media (max-width: 991px) {
    .testimonial-prev {
        left: 0;
    }

    .testimonial-next {
        right: 0;
    }
}

/* Gallery Section */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    aspect-ratio: 4/3;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.3s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
    filter: brightness(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-icon {
    font-size: 2rem;
    color: white;
    transform: scale(0);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item:hover .gallery-icon {
    transform: scale(1);
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: auto;
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 25px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    line-height: 1;
    z-index: 10000;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 700px) {
    .lightbox-content {
        width: 100%;
    }
}

/* HEADER */
    .brand {
      width: 100%; max-width: 920px;
      display: flex; align-items: baseline; gap: 12px;
      margin-bottom: 16px;
    }
    .brand h1 {
      font-family: 'Bebas Neue', sans-serif;
      font-size: clamp(2rem, 5vw, 3.2rem);
      letter-spacing: 4px; color: var(--accent); line-height: 1;
    }
    .brand .sub {
      font-size: .72rem; font-weight: 300;
      color: var(--muted); letter-spacing: 2px; text-transform: uppercase;
    }
    .video-title-bar {
      width: 100%; max-width: 920px;
      margin-bottom: 10px; min-height: 20px;
    }
    .video-title-bar .vtitle {
      font-size: .8rem; color: var(--muted); letter-spacing: .4px;
    }
    .video-title-bar .vtitle i { color: var(--accent); margin-right: 6px; }
 
    /* PLAYER */
    .player {
      width: 100%; max-width: 920px;
      background: var(--surface);
      border-radius: var(--radius);
      overflow: hidden;
      box-shadow: 0 32px 90px rgba(0,0,0,.75), 0 0 0 1px var(--border);
    }
 
    /* VIDEO */
    .vid-wrap {
      position: relative; width: 100%;
      background: #000; cursor: pointer; user-select: none;
    }
    #vid {
      width: 100%; display: block;
      min-height: 320px; max-height: 540px;
      object-fit: contain; background: #000;
    }
    .vid-grad {
      position: absolute; inset: 0;
      background: linear-gradient(to top,rgba(0,0,0,.72) 0%,transparent 38%);
      opacity: 0; transition: opacity .28s; pointer-events: none;
    }
    .vid-wrap:hover .vid-grad { opacity: 1; }
 
    /* flash */
    .flash {
      position: absolute; top: 50%; left: 50%;
      transform: translate(-50%,-50%) scale(0);
      width: 76px; height: 76px; border-radius: 50%;
      background: rgba(0,0,0,.52);
      display: flex; align-items: center; justify-content: center;
      font-size: 1.9rem; color: #fff;
      pointer-events: none; opacity: 0;
    }
    .flash.pop { animation: flashPop .48s ease forwards; }
    @keyframes flashPop {
      0%   { transform:translate(-50%,-50%) scale(.45); opacity:1; }
      60%  { transform:translate(-50%,-50%) scale(1.1);  opacity:1; }
      100% { transform:translate(-50%,-50%) scale(1.35); opacity:0; }
    }
 
    /* spinner */
    .spinner {
      position: absolute; top: 50%; left: 50%;
      transform: translate(-50%,-50%);
      width: 46px; height: 46px;
      border: 3px solid rgba(255,255,255,.12);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin .7s linear infinite;
      display: none; pointer-events: none;
    }
    @keyframes spin { to { transform: translate(-50%,-50%) rotate(360deg); } }
 
    /* CONTROLS */
    .controls { padding: 10px 18px 14px; background: var(--surface); }
 
    .seek-row {
      display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
    }
    .t-label {
      font-size: .73rem; color: var(--muted);
      white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 42px;
    }
    .t-label.r { text-align: right; }
    .t-label span { color: var(--text); font-weight: 500; }
 
    input[type="range"] {
      -webkit-appearance: none; appearance: none;
      height: 4px; border-radius: 99px; outline: none;
      cursor: pointer; transition: height .14s;
    }
    input[type="range"]:hover { height: 6px; }
    input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 14px; height: 14px; border-radius: 50%;
      cursor: pointer; transition: transform .14s;
    }
    input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.35); }
    input[type="range"]::-moz-range-thumb {
      width: 14px; height: 14px; border: none; border-radius: 50%; cursor: pointer;
    }
 
    #seekBar { flex: 1; background: linear-gradient(to right,var(--accent) 0%,var(--muted) 0%); }
    #seekBar::-webkit-slider-thumb { background: var(--accent); box-shadow: 0 0 0 3px rgba(232,255,71,.22); }
    #seekBar::-moz-range-thumb     { background: var(--accent); }
 
    .btn-row { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
    .spacer  { flex: 1; }
 
    .cb {
      background: transparent; border: none;
      color: var(--muted); font-size: 1rem;
      width: 40px; height: 40px; border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      cursor: pointer; transition: color .14s, background .14s, transform .1s;
      flex-shrink: 0;
    }
    .cb:hover  { color: var(--text); background: rgba(255,255,255,.06); }
    .cb:active { transform: scale(.88); }
    .cb.active { color: var(--accent); }
 
    .cb.play {
      width: 46px; height: 46px;
      background: var(--accent); color: #000;
      border-radius: 50%; font-size: 1.05rem;
    }
    .cb.play:hover { background: #f4ff72; }
 
    .cb.speed {
      width: auto; padding: 0 10px;
      font-family: 'DM Sans', sans-serif;
      font-size: .76rem; font-weight: 600; letter-spacing: .4px;
      border: 1.5px solid var(--muted); border-radius: 6px;
    }
    .cb.speed:hover { border-color: var(--accent); color: var(--accent); }
 
    .vol-group { display: flex; align-items: center; gap: 6px; }
    #volBar { width: 70px; background: linear-gradient(to right,var(--accent2) 100%,var(--muted) 100%); }
    #volBar::-webkit-slider-thumb { background: var(--accent2); box-shadow: 0 0 0 3px rgba(255,79,107,.22); }
    #volBar::-moz-range-thumb     { background: var(--accent2); }
 
    .speed-wrap { position: relative; }
    .speed-menu {
      position: absolute; bottom: calc(100% + 6px); left: 0;
      background: #1b1b26;
      border: 1px solid rgba(255,255,255,.09);
      border-radius: 8px; overflow: hidden;
      z-index: 99; min-width: 82px; display: none;
      box-shadow: 0 8px 24px rgba(0,0,0,.5);
    }
    .speed-menu.open { display: block; }
    .speed-menu button {
      display: block; width: 100%; padding: 8px 14px;
      background: none; border: none; color: var(--muted);
      font-family: 'DM Sans', sans-serif; font-size: .82rem;
      text-align: left; cursor: pointer;
      transition: background .13s, color .13s;
    }
    .speed-menu button:hover  { background: rgba(255,255,255,.06); color: var(--text); }
    .speed-menu button.active { color: var(--accent); font-weight: 600; }
 
    /* keyboard hint strip */
    .hint-strip {
      padding: 5px 18px 10px; display: flex; gap: 14px; flex-wrap: wrap;
    }
    .hint { font-size: .65rem; color: var(--muted); display: flex; align-items: center; gap: 4px; }
    .key {
      display: inline-flex; align-items: center; justify-content: center;
      background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12);
      border-radius: 4px; padding: 1px 5px;
      font-size: .6rem; color: var(--text); font-family: monospace; min-width: 20px;
    }