/* ==========================================================================
   MJBPharma - Premium Corporate Theme
   ========================================================================== */

/* --- CSS Variables & Design Tokens --- */
:root {
    /* Colors */
    --primary-color: #206F26; /* MJB Green */
    --primary-light: #4caf50;
    --primary-dark: #144d18;
    --secondary-color: #8bc34a; /* Light Green */
    --accent-color: #ffb300;
    
    --text-main: #333333;
    --text-muted: #6c757d;
    --text-light: #ffffff;
    
    --bg-main: #ffffff;
    --bg-light: #f8f9fa;
    --bg-dark: #1a1a1a;
    
    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Spacing & Layout */
    --container-width: 1200px;
    --section-padding: 5rem 0;
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(13, 71, 161, 0.08);
    --shadow-lg: 0 15px 35px rgba(0,0,0,0.1);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Organic Background Shape */
body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, rgba(139, 195, 74, 0.05) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.section {
    padding: var(--section-padding);
}

.bg-light { background-color: var(--bg-light); }
.text-center { text-align: center; }
.text-white { color: var(--text-light) !important; }
.text-muted { color: var(--text-muted); }
.mb-1 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }
.w-100 { width: 100%; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.align-center { align-items: center; }
.flex-between { display: flex; justify-content: space-between; }

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-dark);
}

.section-title {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.section-title.center::after {
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-muted);
}

.lead {
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--primary-color);
}

/* --- Components --- */
/* Buttons */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 71, 161, 0.4);
    color: var(--text-light);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.btn-outline-sm {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
}
.btn-outline-sm:hover {
    background: var(--primary-color);
    color: white;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    font-weight: 600;
}
.link-arrow::after {
    content: '→';
    margin-left: 5px;
    transition: var(--transition);
}
.link-arrow:hover::after {
    transform: translateX(5px);
}

/* Glassmorphism Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    transition: var(--transition);
}
.glass-card:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 20px 40px rgba(32, 111, 38, 0.12);
}

.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.03);
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(32, 111, 38, 0.1);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.8em;
    font-size: 0.75em;
    font-weight: 700;
    border-radius: 50px;
}
.bg-primary { background-color: var(--primary-color); }
.bg-success { background-color: var(--secondary-color); }
.bg-warning { background-color: var(--accent-color); }

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}
.form-control {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-family);
    transition: var(--transition);
}
.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.1);
}

/* --- Layout Specifics --- */

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 1px 5px rgba(0,0,0,0.05);
    transition: var(--transition);
    padding: 15px 0;
}
.navbar.scrolled {
    padding: 10px 0;
    box-shadow: var(--shadow-sm);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    letter-spacing: -1px;
}
.logo-mjb { color: var(--primary-color); }
.logo-pharma { color: var(--secondary-color); }

.nav-links {
    display: flex;
    gap: 2rem;
}
.nav-links a {
    color: var(--text-main);
    font-weight: 600;
    position: relative;
    padding: 5px 0;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary-color);
    transition: var(--transition);
}
.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}
.nav-links a:hover, .nav-links a.active {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0d47a1 0%, #002171 100%);
    overflow: hidden;
}
/* Abstract background effect for Hero */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 120%;
    height: 200%;
    background: radial-gradient(circle, rgba(0,191,165,0.15) 0%, transparent 60%);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
}
.hero h1 {
    color: white;
    font-size: 4rem;
    margin-bottom: 1.5rem;
}
.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

/* Page Header (Subpages) */
.page-header {
    padding: 180px 0 100px;
    background: linear-gradient(135deg, var(--bg-light) 0%, #e8f5e9 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-header::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: var(--bg-main);
    transform: skewY(-2deg);
    z-index: 1;
}
.page-header .container {
    position: relative;
    z-index: 2;
}
.page-header h1 {
    font-size: 3.5rem;
    color: var(--primary-dark);
}

/* Product Cards */
.product-card {
    padding: 2.5rem 1.5rem;
}
.product-card .card-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

/* Tabs System */
.tabs-header {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
}
.tab-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.5rem 1rem;
    position: relative;
    transition: var(--transition);
}
.tab-btn::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
    border-radius: 4px 4px 0 0;
}
.tab-btn.active {
    color: var(--primary-color);
}
.tab-btn.active::after {
    transform: scaleX(1);
}
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}
.tab-content.active {
    display: block;
}

.product-item .product-img {
    height: 200px;
    background: #eee;
    margin-bottom: 1.5rem;
    border-radius: 8px 8px 0 0;
}
.product-item h4 { margin: 0 1.5rem 0.5rem; }
.product-item p { margin: 0 1.5rem 1.5rem; color: var(--text-muted); }

/* News Cards */
.news-card {
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(0,0,0,0.03);
}
.news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
}
.news-card:hover .news-img {
    transform: scale(1.05);
}
.news-img {
    height: 220px;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}
.news-content {
    padding: 1.5rem;
}
.news-date {
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

/* Feature List */
.feature-list li {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.feature-list i {
    margin-right: 10px;
}
.text-primary { color: var(--primary-color); }

/* Timeline */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #ddd;
    transform: translateX(-50%);
}
.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 50%;
}
.timeline-item:nth-child(odd) {
    left: 0;
    padding-right: 3rem;
}
.timeline-item:nth-child(even) {
    left: 50%;
    padding-left: 3rem;
}
.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    top: 20px;
}
.timeline-item:nth-child(odd) .timeline-dot { right: -10px; }
.timeline-item:nth-child(even) .timeline-dot { left: -10px; }
.timeline-content {
    padding: 1.5rem;
}

/* Footer */
.footer {
    background: var(--primary-dark);
    color: #fff;
    padding: 5rem 0 2rem;
}
.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-logo {
    margin-bottom: 1.5rem;
}
.footer-desc {
    color: #a0b2d6;
    margin-bottom: 1.5rem;
}
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 50%;
    margin-right: 10px;
    transition: var(--transition);
}
.social-links a:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}
.footer h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}
.footer ul li { margin-bottom: 0.8rem; }
.footer ul a {
    color: #a0b2d6;
}
.footer ul a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}
.footer-col.contact-col p {
    color: #a0b2d6;
    margin-bottom: 1rem;
    display: flex;
}
.footer-col.contact-col i {
    margin-top: 5px;
    margin-right: 10px;
    color: var(--secondary-color);
}
.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #a0b2d6;
    font-size: 0.9rem;
}

/* --- Animations --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards cubic-bezier(0.25, 0.8, 0.25, 1);
}
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-container { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 3rem; }
}

@media (max-width: 768px) {
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    
    .menu-toggle { display: block; }
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: #fff;
        flex-direction: column;
        align-items: center;
        padding-top: 2rem;
        transition: 0.4s;
    }
    .nav-links.show {
        left: 0;
    }
    
    .timeline::before { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px !important; padding-right: 0 !important; left: 0 !important; }
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot { left: 10px; }
    
    .tabs-header { flex-direction: column; align-items: center; }
    
    .footer-container { grid-template-columns: 1fr; text-align: center; }
    .footer-col.contact-col p { justify-content: center; }
    .social-links { justify-content: center; display: flex; }
}

/* --- Navigation Dropdown --- */
.nav-links {
    align-items: center;
}
.nav-item.has-dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 5px 0;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    min-width: 180px;
    padding: 10px 0;
    display: none;
    flex-direction: column;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}
.dropdown-menu a {
    color: var(--text-main) !important;
    font-weight: 500 !important;
    padding: 10px 20px !important;
    text-align: left;
    display: block;
    width: 100%;
    transition: var(--transition);
    font-size: 0.95rem;
}
.dropdown-menu a::after {
    display: none !important;
}
.dropdown-menu a:hover {
    background-color: #f8fafc;
    color: var(--primary-color) !important;
}
.dropdown-menu a.active {
    color: var(--primary-color) !important;
    font-weight: 600 !important;
}

@media (min-width: 769px) {
    .nav-item.has-dropdown:hover .dropdown-menu {
        display: flex;
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }
}

@media (max-width: 768px) {
    .nav-links {
        height: auto !important;
        overflow-y: auto;
    }
    .nav-item.has-dropdown {
        width: 100%;
        text-align: center;
    }
    .dropdown-toggle {
        justify-content: center;
        width: 100%;
    }
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        background: #f8fafc;
        width: 100%;
        display: none;
        opacity: 1;
        visibility: visible;
        padding: 5px 0;
        margin-top: 5px;
    }
    .nav-item.has-dropdown.open .dropdown-menu {
        display: flex;
    }
}
