/* RythuVaaradhi - Main Theme CSS
   Modern, responsive design with farming theme and animations
   Created for farmers with accessibility and usability in mind
*/

:root {
    /* Primary Colors */
    --primary-color: #4CAF50;       /* Green */
    --primary-dark: #2E7D32;        /* Dark Green */
    --primary-light: #A5D6A7;       /* Light Green */
    --accent-color: #FFC107;        /* Amber/Golden (wheat color) */
    --accent-dark: #FFA000;         /* Dark Amber */
    --accent-light: #FFECB3;        /* Light Amber */
    --earth-color: #795548;         /* Brown (soil color) */
    --earth-light: #D7CCC8;         /* Light Brown */
    --sky-color: #2196F3;           /* Blue (sky color) */
    --text-dark: #263238;           /* Dark text */
    --text-light: #FFFFFF;          /* Light text */
    --danger-color: #F44336;        /* Red */
    --warning-color: #FF9800;       /* Orange */
    --info-color: #03A9F4;          /* Light Blue */
    --success-color: #4CAF50;       /* Green */
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-800: #343a40;
    
    /* Spacing */
    --section-spacing: 5rem;
    --card-spacing: 1.5rem;
    
    /* Border Radius */
    --border-radius-sm: 0.25rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --border-radius-xl: 2rem;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    
    /* Transitions */
    --transition-speed: 0.3s;
    --transition-function: ease-in-out;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    background-color: #f8f9fa;
    overflow-x: hidden;
    position: relative;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.section-title {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 4px;
    width: 60px;
    background: var(--accent-color);
    border-radius: 2px;
}

.section-title.text-center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all var(--transition-speed) var(--transition-function);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s;
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(46, 125, 50, 0.3);
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-dark);
}

.btn-accent:hover {
    background-color: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--text-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 160, 0, 0.3);
}

.btn-earth {
    background-color: var(--earth-color);
    border-color: var(--earth-color);
    color: white;
}

.btn-earth:hover {
    background-color: #5D4037;
    border-color: #5D4037;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(121, 85, 72, 0.3);
}

.btn-lg {
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.875rem;
}

.btn-floating {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.btn-floating i {
    font-size: 1.5rem;
}

.btn-floating:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Navbar */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    background-color: var(--primary-color);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: var(--primary-dark);
}

.navbar-brand {
    display: flex;
    align-items: center;
}

.navbar-brand img {
    height: 40px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.navbar.scrolled .navbar-brand img {
    height: 35px;
}

.navbar-light .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    padding: 0.5rem 1rem;
    position: relative;
}

.navbar-light .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: white;
}

.navbar-light .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.5);
}

.navbar-light .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.location-info {
    display: flex;
    align-items: center;
    color: white;
    padding: 0.5rem 1rem;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius);
    margin-right: 1rem;
}

.location-info i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

/* Notification Banner */
.notification-banner {
    background-color: var(--accent-color);
    color: var(--text-dark);
    padding: 0.5rem 0;
    overflow: hidden;
}

.marquee {
    white-space: nowrap;
    overflow: hidden;
    box-sizing: border-box;
    animation: marquee 20s linear infinite;
}

.marquee span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-100%, 0);
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.hero-section .card {
    border: none;
    overflow: hidden;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.hero-section .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.hero-section .card-img-top {
    height: 400px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.hero-section:hover .card-img-top {
    transform: scale(1.05);
}

.hero-section .card-body {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 2rem;
}

.hero-section .card-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section .card-text {
    font-size: 1.1rem;
    max-width: 600px;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Services Section */
.services-overview .card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.services-overview .card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.services-overview .card-body {
    padding: 2rem;
    text-align: center;
}

.services-overview .card i {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.services-overview .card:hover i {
    transform: scale(1.2);
    color: var(--primary-dark);
}

.services-overview .card h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Services Grid */
.services-grid {
    margin-bottom: 3rem;
}

.service-item {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.service-item:hover .service-icon {
    transform: scale(1.2);
    color: var(--primary-dark);
}

.service-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-dark);
}

/* News Section */
.news-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.news-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.news-card:hover .card-img-top {
    transform: scale(1.1);
}

.news-date {
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* Weather Widget */
.weather-widget {
    background: linear-gradient(135deg, #48c6ef, #6f86d6);
    color: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.weather-widget::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    animation: rotate 20s linear infinite;
    z-index: 1;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.weather-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 1rem;
}

.weather-temp {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.weather-condition {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    text-transform: capitalize;
}

.weather-location {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.weather-detail-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 0.25rem;
}

.weather-detail-value {
    font-size: 1.2rem;
    font-weight: 600;
}

/* Features Section */
.feature-card {
    border: none;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-card .card-body {
    padding: 2rem;
}

.feature-card .card-title i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='%234CAF50' fill-opacity='0.2' d='M0,224L48,213.3C96,203,192,181,288,181.3C384,181,480,203,576,202.7C672,203,768,181,864,181.3C960,181,1056,203,1152,208C1248,213,1344,203,1392,197.3L1440,192L1440,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'%3E%3C/path%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    opacity: 0.5;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 60px;
    margin-bottom: 1rem;
}

.footer-links h5 {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-links i {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.social-links {
    display: flex;
    margin-top: 1.5rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 1rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    position: relative;
    z-index: 2;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.active {
    opacity: 1;
    transform: translateY(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.active {
    opacity: 1;
    transform: scale(1);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-left.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-in-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* Floating Elements Animation */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Pulse Animation */
.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Bottom Navigation for Mobile */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.bottom-nav .nav-item {
    flex: 1;
    text-align: center;
    padding: 0.75rem 0;
}

.bottom-nav .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--gray-800);
    font-size: 0.8rem;
}

.bottom-nav .nav-link i {
    font-size: 1.2rem;
    margin-bottom: 0.25rem;
}

.bottom-nav .nav-link.active {
    color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    html {
        font-size: 15px;
    }
    
    .hero-section .card-img-top {
        height: 350px;
    }
    
    .hero-section .card-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 992px) {
    html {
        font-size: 14px;
    }
    
    .hero-section .card-img-top {
        height: 300px;
    }
    
    .hero-section .card-title {
        font-size: 2rem;
    }
    
    .weather-widget {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-section .card-img-top {
        height: 250px;
    }
    
    .hero-section .card-title {
        font-size: 1.8rem;
    }
    
    .hero-section .card-body {
        padding: 1.5rem;
    }
    
    .bottom-nav {
        display: flex;
    }
    
    body {
        padding-bottom: 70px;
    }
    
    .service-item {
        padding: 1.5rem 1rem;
    }
    
    .service-icon {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    html {
        font-size: 13px;
    }
    
    .hero-section .card-img-top {
        height: 200px;
    }
    
    .hero-section .card-title {
        font-size: 1.5rem;
    }
    
    .hero-section .card-body {
        padding: 1rem;
    }
    
    .hero-section .card-text {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .weather-temp {
        font-size: 2.5rem;
    }
    
    .weather-condition {
        font-size: 1.2rem;
    }
}

/* Zoom Support */
@media (min-width: 1400px) {
    html {
        font-size: 17px;
    }
}

@media (min-width: 1600px) {
    html {
        font-size: 18px;
    }
    
    .container {
        max-width: 1440px;
    }
}

@media (min-width: 1900px) {
    html {
        font-size: 19px;
    }
    
    .container {
        max-width: 1640px;
    }
}

/* Dark Mode Support */
body.dark-mode {
    background-color: #121212;
    color: #f5f5f5;
}

body.dark-mode .card,
body.dark-mode .service-item {
    background-color: #1e1e1e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

body.dark-mode .card-title,
body.dark-mode .service-title {
    color: #f5f5f5;
}

body.dark-mode .card-text {
    color: #d0d0d0;
}

body.dark-mode .navbar-light .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
}

body.dark-mode .bottom-nav {
    background-color: #1e1e1e;
}

body.dark-mode .bottom-nav .nav-link {
    color: #d0d0d0;
}

body.dark-mode .bottom-nav .nav-link.active {
    color: var(--primary-light);
}

/* Print Styles */
@media print {
    .navbar,
    .notification-banner,
    .bottom-nav,
    footer {
        display: none !important;
    }
    
    body {
        background-color: white !important;
        color: black !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .card,
    .service-item {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
    
    .hero-section .card-body {
        position: static !important;
        background: none !important;
        color: black !important;
    }
    
    .hero-section .card-title,
    .hero-section .card-text {
        color: black !important;
        text-shadow: none !important;
    }
}

/* Accessibility */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Skip to content link for keyboard users */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}
