/* Import Premium Font */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@700;800&display=swap');

:root {
    --primary-color: #16a34a;
    --secondary-color: #14532d;
    --accent-color: #22c55e;
    --dark-bg: #0f172a;
    --card-bg: #1e293b;
    --text-light: #f8fafc;
    --text-muted: #64748b;
    --success: #16a34a;
    --danger: #ef4444;
    --warning: #f59e0b;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f1f5f9;
    background-image: radial-gradient(at 0% 0%, rgba(22, 163, 74, 0.05) 0, transparent 50%), radial-gradient(at 50% 0%, rgba(20, 83, 45, 0.05) 0, transparent 50%);
    color: #334155;
    overflow-x: hidden;
    padding-top: 80px;
    font-size: 0.875rem;
    min-height: 100vh;
}

/* Adjust headings proportionally */
h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

/* Adjust table font sizes */
.table {
    font-size: 0.875rem;
}

.table-sm {
    font-size: 0.8125rem;
}

/* Adjust form controls */
.form-control,
.form-select {
    font-size: 0.875rem;
}

/* Adjust buttons */
.btn {
    font-size: 0.875rem;
}

.btn-sm {
    font-size: 0.8125rem;
}

.btn-lg {
    font-size: 1rem;
}

@media (max-width: 991.98px) {
    body {
        padding-top: 60px;
        font-size: 0.8125rem;
        /* 13px on mobile */
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.35rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 1rem;
    }

    h6 {
        font-size: 0.9rem;
    }

    .table {
        font-size: 0.8125rem;
    }

    .table-sm {
        font-size: 0.75rem;
    }

    .form-control,
    .form-select,
    .form-label {
        font-size: 0.8125rem;
    }

    .btn {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .btn-lg {
        font-size: 0.9375rem;
        padding: 0.5rem 1rem;
    }

    .glass-card {
        padding: 0.75rem !important;
    }

    .glass-card.p-3 {
        padding: 0.5rem !important;
    }

    .glass-card.p-4 {
        padding: 0.75rem !important;
    }

    .glass-card.p-5 {
        padding: 1rem !important;
    }

    .badge {
        font-size: 0.7rem;
        padding: 0.25em 0.5em;
    }

    .alert {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }
}


/* Carousel Text Shadows */
.carousel-caption h1 {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 0, 0, 0.5);
}

.carousel-caption p.lead {
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7), 0 0 15px rgba(0, 0, 0, 0.4);
}

.carousel-caption .btn {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Bootstrap Overrides */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    box-shadow: 0 4px 6px -1px rgba(22, 163, 74, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(22, 163, 74, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Navbar */
.navbar {
    background-color: #ffffff !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    transition: top 0.3s ease;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1030;
}

/* Slower navbar collapse animation */
.navbar-collapse {
    transition: height 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.navbar-collapse.collapsing {
    transition: height 0.5s ease-in-out;
}

.navbar.navbar-hidden {
    top: -80px;
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
    letter-spacing: -0.5px;
    padding: 0;
}

.brand-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.9rem;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1px;
}

.nav-link {
    font-weight: 600;
    color: var(--secondary-color) !important;
    margin: 0 10px;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* Glassmorphism Cards */
.glass-card {
    background: #ffffff;
    /* Solid white for distinct separation */
    border: 1px solid rgba(226, 232, 240, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-card table {
    background-color: transparent !important;
}

.glass-card table td, 
.glass-card table th {
    background-color: transparent !important;
}

.glass-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
    border-color: rgba(203, 213, 225, 1);
}

/* Action Cards (Quick Access) */
.action-card {
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 1);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.action-card:hover {
    background: #e2e8f0;
    /* Subtle gray on hover */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transform: translateY(-3px);
    border-color: var(--primary-color);
}

/* Card Variants for Distinct Sections */
/* Card Variants for Distinct Sections */
.card-variant-success {
    background: linear-gradient(145deg, #dcfce7 0%, #f0fdf4 100%);
    border-color: #86efac;
}

.card-variant-primary {
    background: linear-gradient(145deg, #dbeafe 0%, #eff6ff 100%);
    border-color: #93c5fd;
}

.card-variant-danger {
    background: linear-gradient(145deg, #fee2e2 0%, #fef2f2 100%);
    border-color: #fca5a5;
}

.card-variant-warning {
    background: linear-gradient(145deg, #fef3c7 0%, #fffbeb 100%);
    border-color: #fcd34d;
}

.card-variant-info {
    background: linear-gradient(145deg, #e0f2fe 0%, #f0f9ff 100%);
    border-color: #7dd3fc;
}

.card-variant-surface {
    background: linear-gradient(145deg, #f1f5f9 0%, #f8fafc 100%);
    border-color: #cbd5e1;
}

/* Premium Input Styles */
.form-control,
.form-select {
    border-radius: 10px;
    padding: 0.6rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.9);
    transition: all 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.1);
    border-color: var(--primary-color);
}

/* Button Refinements */
.rounded-pill {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

/* Footer */
footer {
    background: linear-gradient(to bottom, #056066ce, #04034198);
    color: #f8fafc !important;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

footer h5 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 25px;
}

footer p,
footer li {
    color: #e2e8f0 !important;
}

footer a {
    color: #cbd5e1 !important;
    text-decoration: none;
    transition: all 0.3s ease;
}

footer a:hover {
    color: var(--accent-color) !important;
    padding-left: 5px;
}

footer .text-muted {
    color: #94a3b8 !important;
}

.social-icon {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Utilities */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: translateY(-5px);
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Top Button */
#scrollTopBtn {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#scrollTopBtn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Newsletter Email Placeholder */
#newsletter-email::placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

#newsletter-email::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#newsletter-email::-moz-placeholder {
    color: rgba(255, 255, 255, 0.7);
    opacity: 1;
}

#newsletter-email:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Hero Logo and Branding in Carousel */
.hero-brand-container {
    text-align: center;
    animation: fadeInDown 1s ease-out;
}

.hero-logo {
    height: 120px;
    width: auto;
    filter: drop-shadow(0 4px 20px rgba(255, 255, 255, 0.3));
    animation: pulse 2s ease-in-out infinite;
}

.hero-brand-text {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    margin: 0;
}

.hero-brand-sub {
    display: block;
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #0d6efd 0%, #0dcaf0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: 4px;
    text-transform: uppercase;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Mobile Carousel Height and Text Adjustments */
@media (max-width: 768px) {
    .carousel-item {
        height: 45vh !important;
    }

    .hero-logo {
        height: 80px;
    }

    .hero-brand-text {
        font-size: 2rem;
    }

    .hero-brand-sub {
        font-size: 1.2rem;
    }

    .carousel-caption h1 {
        font-size: 1.5rem !important;
        margin-bottom: 0.5rem !important;
    }

    .carousel-caption p.lead {
        font-size: 0.9rem !important;
        margin-bottom: 1rem !important;
    }

    .carousel-caption .btn {
        padding: 0.4rem 1.2rem !important;
        font-size: 0.85rem !important;
    }

    .carousel-caption img {
        height: 60px !important;
        margin-bottom: 0.8rem !important;
    }
}

@media (min-width: 769px) {
    .carousel-caption .btn.btn-primary.btn-lg {
        padding: 0.3rem 1.5rem;
        font-size: 1.2rem;
        line-height: 1.2;
        border-radius: 25px;
        min-height: auto;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        text-align: center;
    }
}

/* Mobile centering for Featured Products and Latest News */
@media (max-width: 768px) {

    section .text-center,
    section .text-center h2,
    section .text-center p {
        text-align: center !important;
        display: block !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    section .text-center a.btn {
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .marquee-container {
        display: flex;
        justify-content: center;
    }

    #latest-news .row.g-4 {
        justify-content: center !important;
    }

    #latest-news .glass-card {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Center footer content on mobile */
@media (max-width: 768px) {
    footer .row>div {
        text-align: center !important;
    }

    footer .d-flex {
        justify-content: center !important;
    }

    footer ul {
        padding-left: 0 !important;
    }

    footer .text-md-start,
    footer .text-md-end {
        text-align: center !important;
    }

    footer .mt-3 {
        display: flex;
        justify-content: center;
    }
}

/* Flatpickr Global Fixes */
.flatpickr-calendar { z-index: 99999 !important; }
.flatpickr-input[readonly] { background-color: transparent !important; }
/* Table Compact Utilities */
.table-compact td, 
.table-compact th {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
    font-size: 0.85rem !important;
}

.table-compact thead th {
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
}
