/* ========================================
   Modern CSS for Qatar Pharmacy Website
   Optimized for Mobile & Desktop
   ======================================== */

:root {
    --primary-color: #5B0E14;
    --secondary-color: #f0b400;
    --accent-color: #e63946;
    --background-color: #fdfdfd;
    --text-color: #333;
    --font-family: 'Cairo', sans-serif;
    --dark-bg: #f8f9fa;
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
}

/* ========================================
   Header & Navigation
   ======================================== */

.header {
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 999;
    transition: all 0.3s ease;
    border-bottom: 3px solid var(--primary-color);
}

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

.logo {
    font-weight: 700;
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    color: var(--accent-color);
}

.nav-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.nav-link {
    font-weight: 600;
    color: var(--primary-color);
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(91, 14, 20, 0.1);
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    background: linear-gradient(135deg, var(--primary-color), #00509e);
    color: white;
    padding: 4rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,144C960,149,1056,139,1152,122.7C1248,107,1344,85,1392,74.7L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    animation: fadeInDown 1s;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    animation: fadeInUp 1s 0.3s both;
    line-height: 1.8;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.hero img {
    max-width: 100%;
    height: auto;
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-size: 1rem;
    margin: 0.5rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 15px rgba(240, 180, 0, 0.3);
}

.btn-primary:hover {
    background-color: #ffc107;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(240, 180, 0, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

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

/* ========================================
   Sections
   ======================================== */

.section {
    padding: 5rem 1rem;
    background-color: white;
}

.section:nth-child(even) {
    background-color: var(--dark-bg);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    line-height: 1.3;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-color));
    margin: 1rem auto 0;
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #555;
    text-align: center;
    max-width: 900px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

/* ========================================
   Cards
   ======================================== */

.feature-card, .product-card, .location-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    padding: 2rem;
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #f0f0f0;
}

.feature-card:hover, .product-card:hover, .location-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    border-color: var(--secondary-color);
}

.feature-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--secondary-color), #ffc107);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.product-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* ========================================
   WhatsApp Button
   ======================================== */

.whatsapp-float {
    position: fixed;
    width: 70px;
    height: 70px;
    bottom: 30px;
    left: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50%;
    text-align: center;
    font-size: 35px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.5);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.7);
    animation: none;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 1rem;
    text-align: center;
    margin-top: 3rem;
}

.footer-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.footer-link {
    color: white;
    opacity: 0.8;
    transition: opacity 0.3s;
    text-decoration: none;
    display: inline-block;
    margin: 0 1rem;
}

.footer-link:hover {
    opacity: 1;
    text-decoration: underline;
}

/* ========================================
   Tables
   ======================================== */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background-color: var(--primary-color);
    color: white;
}

th {
    padding: 1rem;
    text-align: right;
    font-weight: 700;
}

td {
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

tbody tr:hover {
    background-color: var(--dark-bg);
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 1024px) {
    .nav-container {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .header nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-container {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 0;
    }
    
    .nav-container.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 0.8rem 1rem;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .hero {
        padding: 3rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    .section {
        padding: 3rem 1rem;
    }
    
    .btn {
        padding: 0.8rem 2rem;
        font-size: 0.95rem;
        margin: 0.5rem 0.25rem;
    }
    
    .whatsapp-float {
        width: 60px;
        height: 60px;
        font-size: 30px;
        bottom: 20px;
        left: 20px;
    }
    
    .feature-card, .product-card {
        padding: 1.5rem;
    }
    
    .product-img {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.4rem;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .section-title::after {
        width: 60px;
    }
    
    .btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 28px;
        left: 15px;
        bottom: 15px;
    }
    
    .feature-card, .product-card {
        padding: 1rem;
    }
    
    .section {
        padding: 2rem 1rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }
}

/* ========================================
   Utility Classes
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 2rem;
}

.grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

.bg-gray-100 {
    background-color: var(--dark-bg);
}

.bg-white {
    background-color: white;
}

.overflow-x-auto {
    overflow-x: auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-8 {
    margin-top: 2rem;
}

.rounded-lg {
    border-radius: 12px;
}

.shadow-lg {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.shadow-md {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.max-w-full {
    max-width: 100%;
}

.h-auto {
    height: auto;
}

