/* Custom CSS Variables */
:root {
    --primary-color: #2E7D32;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --secondary-color: #FFC107;
    --accent-color: #FF6B35;
    --text-dark: #212529;
    --text-light: #6C757D;
    --text-light-gray: #333536 !important;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --border-color: #E9ECEF;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* Custom Bootstrap Overrides */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

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

.text-light-gray {
    color: var(--text-light-gray);
}

/* Header Styles */
.header-section {
    position: relative;
    z-index: 1000;
}

.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark) !important;
    text-decoration: none;
}

.brand-text {
    color: var(--primary-color);
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 0.375rem;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color) !important;
    background-color: var(--bg-light);
}

.nav-link.active {
    color: var(--primary-color) !important;
    background-color: var(--bg-light);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 8rem 0 6rem;
    margin-top: 76px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-hero {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: var(--transition);
}

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

.btn-hero-primary:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

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

.btn-hero-outline:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Content Sections */
.content-section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Feature Cards */
.feature-card {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* Info Cards */
.info-card {
    background: var(--bg-light);
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.info-card:hover {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.info-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Contact Form */
.contact-form {
    background: var(--bg-white);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(46, 125, 50, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Footer */
.footer-section {
    background-color: #ffffff !important;
    color: var(--text-light-gray);
}

.footer-section h5,
.footer-section h6 {
    color: var(--primary-color);
}

.footer-section a {
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary-light) !important;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-light);
    transform: translateY(-3px);
}

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

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-cta {
        justify-content: center;
    }

    .content-section {
        padding: 3rem 0;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .feature-card,
    .contact-form {
        padding: 1.5rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 5rem 0 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .content-section {
        padding: 2rem 0;
    }

    .feature-card,
    .contact-form {
        padding: 1rem;
    }

    .btn-hero {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.bg-light-custom {
    background-color: #ffffff !important;
}



/* Enhanced Mobile Optimization */
@media (max-width: 991px) {
    .navbar-nav {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 0.5rem;
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: var(--shadow-md);
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
        margin: 0.25rem 0;
    }

    .hero-section {
        padding: 5rem 0 3rem;
    }

    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-hero {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .feature-card {
        margin-bottom: 1.5rem;
    }

    .section-title h2 {
        font-size: 1.75rem;
    }

    .section-title p {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero-section {
        padding: 4rem 0 2rem;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .content-section {
        padding: 2.5rem 0;
    }

    .feature-card,
    .info-card,
    .contact-form {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }

    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }

    .feature-title {
        font-size: 1.1rem;
    }

    .feature-description {
        font-size: 0.9rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .brand-text {
        display: none;
    }

    .footer-section {
        padding: 2rem 0 !important;
    }

    .footer-section .col-lg-4,
    .footer-section .col-lg-3,
    .footer-section .col-lg-2 {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 575px) {
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .hero-section {
        padding: 3rem 0 2rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .content-section {
        padding: 2rem 0;
    }

    .feature-card,
    .info-card,
    .contact-form {
        padding: 1rem;
    }

    .section-title {
        margin-bottom: 2rem;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .btn-hero {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }

    .navbar {
        padding: 0.75rem 0;
    }

    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 1rem;
    }

    h6 {
        font-size: 0.9rem;
    }

    .form-control {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.9rem;
    }

    .alert {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .nav-link {
        padding: 1rem !important;
        margin: 0.25rem 0;
    }

    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .feature-card:hover,
    .info-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }

    .btn-primary:hover {
        transform: none;
    }

    .social-links a:hover {
        transform: none;
    }
}

/* Landscape mobile optimization */
@media (max-width: 767px) and (orientation: landscape) {
    .hero-section {
        padding: 2rem 0 1.5rem;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .content-section {
        padding: 1.5rem 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    .feature-icon,
    .hero-section::before {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in-up {
        animation: none;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #E9ECEF;
        --text-light: #ADB5BD;
        --text-light-gray: #333536;
        --bg-light: #212529;
        --bg-white: #343A40;
        --border-color: #495057;
    }

    body {
        color: var(--text-dark);
    }

    .navbar {
        background-color: rgba(52, 58, 64, 0.95) !important;
    }

    .feature-card,
    .info-card,
    .contact-form {
        background-color: var(--bg-white);
        border-color: var(--border-color);
    }

    .form-control {
        background-color: var(--bg-light);
        border-color: var(--border-color);
        color: var(--text-dark);
    }

    .form-control:focus {
        background-color: var(--bg-white);
        border-color: var(--primary-color);
        color: var(--text-dark);
    }
}

/* Print styles */
@media print {

    .navbar,
    .footer-section,
    .hero-cta,
    .btn,
    #contactForm {
        display: none !important;
    }

    .hero-section {
        background: none !important;
        color: black !important;
        padding: 1rem 0 !important;
    }

    .content-section {
        padding: 1rem 0 !important;
    }

    .feature-card,
    .info-card {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for better accessibility */
.btn:focus,
.nav-link:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip link for screen readers */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 1001;
}

.skip-link:focus {
    top: 6px;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smooth scrolling for supported browsers */
html {
    scroll-behavior: smooth;
}

/* Enhanced button styles for mobile */
@media (max-width: 767px) {
    .btn-primary {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-cta .btn {
        margin-bottom: 0.75rem;
    }

    .hero-cta .btn:last-child {
        margin-bottom: 0;
    }
}