/* Custom CSS for Agrosis Website */

/* Global Styles */
:root {
    /* Primary colors */
    --primary-blue: #085C2B;
    --secondary-green: #7AC943;
    --dark-blue: #064C23;
    --light-blue: #e6f9f0;
    --light-green: #f2fdf7;
    
    /* Extended palette */
    --accent-orange: #FF6B35;
    --accent-yellow: #FFD23F;
    --neutral-gray: #4A5568;
    --light-gray: #F7FAFC;
    
    /* Text colors */
    --text-dark: #212529;
    --text-muted: #6B7280;
    --white: #ffffff;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #085C2B 0%, #064C23 100%);
    --gradient-secondary: linear-gradient(135deg, #7AC943 0%, #57a331 100%);
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    scroll-behavior: smooth;
    font-weight: 400;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 600;
    line-height: 1.2;
}

.display-1 { font-size: 3.5rem; font-weight: 700; line-height: 1.1; }
.display-2 { font-size: 3rem; font-weight: 700; line-height: 1.1; }
.display-3 { font-size: 2.5rem; font-weight: 600; line-height: 1.2; }
.display-4 { font-size: 2rem; font-weight: 600; line-height: 1.2; }
.display-5 { font-size: 1.75rem; font-weight: 600; line-height: 1.3; }

h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 2rem; font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 500; }
h5 { font-size: 1.125rem; font-weight: 500; }
h6 { font-size: 1rem; font-weight: 500; }

.lead { 
    font-size: 1.25rem; 
    font-weight: 400; 
    line-height: 1.6; 
    color: var(--text-muted);
}

/* Spacing System */
.section-padding { padding: 5rem 0; }
.section-padding-sm { padding: 3rem 0; }
.section-padding-lg { padding: 7rem 0; }

/* Container improvements */
.container { 
    padding-left: 1rem; 
    padding-right: 1rem; 
}

@media (min-width: 768px) {
    .container { 
        padding-left: 2rem; 
        padding-right: 2rem; 
    }
}

/* Top Bar Styles */
.top-bar {
    background-color: var(--secondary-green);
    color: white;
    padding: 8px 0;
    font-size: 0.9rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1031;
}

.contact-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.contact-info span {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

.contact-info span:hover {
    opacity: 0.8;
}

.contact-info i {
    font-size: 0.8rem;
}

.social-media {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

.social-link {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.social-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    text-decoration: none;
}

/* Navigation Styles */
.navbar {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.top-navbar {
    top: 40px; /* Account for top bar height */
}

.navbar-brand img {
    transition: transform 0.3s ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    position: relative;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: var(--text-dark);
}

.nav-link:hover {
    background: rgba(0, 120, 190, 0.1);
    color: var(--primary-blue);
    text-decoration: none;
}

.nav-link.active {
    background: rgba(0, 120, 190, 0.15);
    color: var(--primary-blue);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, 
        rgba(0, 120, 190, 0.05) 0%, 
        rgba(35, 155, 59, 0.05) 100%);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
    min-height: 30vh;
}

.hero-with-topbar {
    padding-top: 120px; /* Account for top bar (40px) + navbar (80px) */
}

.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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%230078BE" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
    pointer-events: none;
}

/* Floating Shapes Animation */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-blue), var(--secondary-green));
    opacity: 0.1;
    animation: float-shape 8s ease-in-out infinite;
}

.shape-1 {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 60px;
    height: 60px;
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.shape-3 {
    width: 40px;
    height: 40px;
    top: 30%;
    right: 30%;
    animation-delay: 4s;
}

.shape-4 {
    width: 100px;
    height: 100px;
    bottom: 20%;
    left: 20%;
    animation-delay: 1s;
}

.shape-5 {
    width: 50px;
    height: 50px;
    top: 80%;
    left: 60%;
    animation-delay: 3s;
}

@keyframes float-shape {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.1;
    }
    50% { 
        transform: translateY(-30px) rotate(180deg); 
        opacity: 0.2;
    }
}

/* Hero Content Animations */
.hero-content {
    position: relative;
    z-index: 1;
}

.animate-text {
    overflow: hidden;
}

.text-line {
    display: block;
    opacity: 0;
    transform: translateY(50px);
    animation: slideInUp 1s ease-out forwards;
}

.text-line:nth-child(1) {
    animation-delay: 0.3s;
}

.text-line:nth-child(2) {
    animation-delay: 0.6s;
}

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

.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 0.9s forwards;
}

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

.animate-buttons {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease-out 1.2s forwards;
}

/* Hero Buttons */
.hero-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.hero-btn .btn-text {
    transition: transform 0.3s ease;
}

.hero-btn .btn-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.hero-btn:hover .btn-text {
    transform: translateX(-10px);
}

.hero-btn:hover .btn-icon {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* Hero Slider Container */
.hero-slider-container {
    position: relative;
    z-index: 2;
    max-width: 500px;
    margin: 0 auto;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    border-radius: 20px;
    background: transparent;
}

.slider-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.slider-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slider-slide.prev {
    transform: translateX(-100%);
}

.hero-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 20px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
}

.slider-slide.active .hero-image {
    animation: float 6s ease-in-out infinite;
}

/* Slide Content */
.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: white;
    padding: 2rem 1.5rem 1.5rem;
    border-radius: 0 0 20px 20px;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(5px);
}

.slider-slide.active .slide-content {
    transform: translateY(0);
}

.slide-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-family: 'Poppins', sans-serif;
}

.slide-description {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
    font-family: 'Inter', sans-serif;
}

/* Slider Navigation */
.slider-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    pointer-events: none;
    z-index: 10;
}

.slider-nav-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.slider-nav-btn:hover {
    background: rgba(0, 120, 190, 0.9);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 120, 190, 0.3);
}

.slider-nav-btn:active {
    transform: scale(0.95);
}

.slider-nav-btn i {
    font-size: 1.2rem;
}

/* Slider Indicators */
.slider-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
    z-index: 10;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.indicator {
    width: 10px;
    height: 10px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.indicator.active {
    background: var(--primary-blue);
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(0, 120, 190, 0.5);
}

.indicator:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

.indicator.active:hover {
    background: var(--primary-blue);
    box-shadow: 0 0 15px rgba(0, 120, 190, 0.7);
}

.hero-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 120, 190, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-glow 4s ease-in-out infinite;
    z-index: 1;
}

@keyframes pulse-glow {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.6;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}

.animate-image {
    opacity: 0;
    transform: scale(0.8) rotate(-10deg);
    animation: imageEntrance 1.5s ease-out 0.6s forwards;
}

@keyframes imageEntrance {
    to {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s infinite;
}

.scroll-arrow {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.scroll-arrow:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-3px);
}

.scroll-arrow i {
    font-size: 1.2rem;
    color: var(--primary-blue);
    transition: color 0.3s ease;
}

.scroll-arrow:hover i {
    color: white;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* About Section */
.about-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.about-image-container img {
    transition: transform 0.5s ease;
}

.about-image-container:hover img {
    transform: scale(1.05);
}

.feature-item {
    padding: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
}

.feature-item:hover {
    transform: translateY(-4px);
    background: rgba(0, 120, 190, 0.05);
}

/* Product Cards */
.product-card {
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: white;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
    border-color: var(--primary-blue);
}

.product-card .card-img-top {
    transition: transform 0.5s ease;
    height: 200px;
    object-fit: cover;
}

.product-card:hover .card-img-top {
    transform: scale(1.1);
}

.product-card .card-body {
    padding: 1.5rem;
}

/* Contact Section */
.contact-item {
    padding: 2rem 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
}

.contact-item:hover {
    transform: translateY(-4px);
    background: rgba(0, 120, 190, 0.05);
}

.contact-item i {
    transition: transform 0.3s ease;
}

.contact-item:hover i {
    transform: scale(1.2);
}

/* Footer */
.social-links a {
    display: inline-flex;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    line-height: 40px;
    align-items: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

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

/* Buttons */
.btn {
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.025em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    text-transform: none;
}

.btn-primary {
    background: var(--gradient-primary);
    box-shadow: 0 4px 14px rgba(0, 120, 190, 0.25);
}

.btn-primary:hover {
    background: var(--gradient-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 120, 190, 0.35);
}

.btn-success {
    background-color: var(--secondary-green);
    border-color: var(--secondary-green);
}

.btn-success:hover {
    background-color: #1a7a2e;
    border-color: #1a7a2e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(35, 155, 59, 0.3);
}

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

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 120, 190, 0.35);
}

.btn-outline-success {
    color: var(--secondary-green);
    border-color: var(--secondary-green);
}

.btn-outline-success:hover {
    background-color: var(--secondary-green);
    border-color: var(--secondary-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(35, 155, 59, 0.3);
}

/* Typography */
.display-4, .display-5 {
    font-weight: 700;
    line-height: 1.2;
}

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

.bg-agri {
    background: linear-gradient(90deg, #54ac3c52 35%, #54ac3cf0);
}

.text-success {
    color: var(--secondary-green) !important;
}

/* Accessibility Improvements */
.btn:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Better link styling */
a {
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    text-decoration: underline;
}

/* Loading states */
.btn:active {
    transform: scale(0.98);
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Responsive Typography */
    .display-1 { font-size: 2.5rem; }
    .display-2 { font-size: 2rem; }
    .display-3 { font-size: 1.75rem; }
    .lead { font-size: 1.125rem; }
    
    /* Hero Slider Mobile */
    .hero-slider-container {
        max-width: 100%;
        margin-top: 2rem;
    }
    
    .hero-slider {
        height: 300px;
        border-radius: 16px;
        background: transparent;
    }
    
    .slide-content {
        padding: 1.5rem 1rem 1rem;
    }
    
    .slide-title {
        font-size: 1.1rem;
    }
    
    .slide-description {
        font-size: 0.85rem;
    }
    
    .slider-nav-btn {
        width: 36px;
        height: 36px;
    }
    
    .slider-nav-btn i {
        font-size: 1rem;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
    
    .top-bar {
        padding: 6px 0;
        font-size: 0.8rem;
    }
    
    .contact-info {
        justify-content: center;
        margin-bottom: 5px;
    }
    
    .contact-info span {
        margin: 0 10px;
    }
    
    .social-media {
        justify-content: center;
        gap: 10px;
    }
    
    .social-link {
        width: 25px;
        height: 25px;
        font-size: 0.8rem;
    }
    
    .top-navbar {
        top: 60px; /* Account for taller top bar on mobile */
    }
    
    .hero-section {
        text-align: center;
        padding-top: 100px;
    }
    
    .hero-with-topbar {
        padding-top: 140px; /* Account for top bar (60px) + navbar (80px) on mobile */
    }
    
    .about-image-container {
        margin-top: 2rem;
    }
    
    .feature-item {
        margin-bottom: 1rem;
    }
    
    .contact-item {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    /* Hero Slider Small Mobile */
    .hero-slider {
        height: 250px;
        border-radius: 12px;
        background: transparent;
    }
    
    .slide-content {
        padding: 1rem 0.75rem 0.75rem;
    }
    
    .slide-title {
        font-size: 1rem;
        margin-bottom: 0.25rem;
    }
    
    .slide-description {
        font-size: 0.8rem;
    }
    
    .slider-nav-btn {
        width: 32px;
        height: 32px;
    }
    
    .slider-nav-btn i {
        font-size: 0.9rem;
    }
    
    .slider-indicators {
        bottom: 0.75rem;
        gap: 0.25rem;
    }
    
    .indicator {
        width: 6px;
        height: 6px;
    }
    
    .top-bar {
        padding: 5px 0;
        font-size: 0.75rem;
    }
    
    .contact-info span {
        margin: 0 5px;
    }
    
    .contact-info .email-info {
        display: none; /* Hide email on very small screens */
    }
    
    .social-link {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }
    
    .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.8rem;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Loading animation for images */
img {
    opacity: 0;
    animation: fadeIn 0.5s ease-in forwards;
}

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



/* Product Features */
.product-features .badge {
    font-size: 0.75rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--primary-blue) !important;
    border: none;
    transition: all 0.3s ease;
}

.product-features .badge:hover {
    background-color: var(--dark-blue) !important;
    transform: translateY(-2px);
}



/* Statistics Section */
.stat-item {
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
}

.counter {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--dark-blue);
}

.custom-pagination .page-link {
    border-radius: 50% !important;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
    color: #28a745;
    border: 1px solid #dee2e6;
    background-color: #fff;
    transition: all 0.3s ease;
}

.custom-pagination .page-link:hover {
    background-color: #28a745;
    color: #fff;
}

.custom-pagination .page-item.active .page-link {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.custom-pagination .page-item.disabled .page-link {
    background-color: #f1f1f1;
    color: #ccc;
    pointer-events: none;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}