/* Global Styles */
:root {
    --primary-color: #2e7d32;
    --secondary-color: #81c784;
    --dark-color: #1b5e20;
    --light-color: #e8f5e9;
    --text-color: #333;
    --white: #fff;
    --gray: #f5f5f5;
    --dark-gray: #757575;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
}

/* Header Styles */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    padding: 1rem 0;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('images/irrigation-bg.jpg');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 10rem 0 5rem;
    text-align: center;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 2rem;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background-color: var(--gray);
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Dashboard Section */
.dashboard {
    padding: 5rem 0;
}

.dashboard h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.dashboard-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.sensor-data {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.data-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.data-card h3 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.gauge {
    height: 150px;
    width: 100%;
    margin: 0 auto 1rem;
    position: relative;
    background: conic-gradient(
        #f44336 0% 20%,
        #ff9800 20% 40%,
        #ffeb3b 40% 60%,
        #8bc34a 60% 80%,
        #4caf50 80% 100%
    );
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge::before {
    content: '';
    position: absolute;
    width: 75%;
    height: 75%;
    background-color: var(--white);
    border-radius: 50%;
}

.value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.controls {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.controls h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.control-group {
    margin-bottom: 1.5rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.control-group select, 
.control-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

#manual-controls {
    display: none;
    margin-top: 1.5rem;
}

.duration-control {
    margin-top: 1rem;
}

.status {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.status p {
    margin-bottom: 0.5rem;
}

.chart-container {
    margin-top: 2rem;
    height: 300px;
}

/* About Section */
.about {
    padding: 5rem 0;
    background-color: var(--gray);
}

.about h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-color);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-info {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 2rem;
    border-radius: 8px;
}

.contact-info h3 {
    margin-bottom: 1.5rem;
}

.contact-info p {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
}

.contact-info i {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

.contact-form {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 3rem 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.footer-logo img {
    height: 40px;
    margin-right: 10px;
}

.footer-links h4,
.footer-newsletter h4 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--white);
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-color);
}

.footer-newsletter input {
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Styles */
@media (max-width: 768px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    nav ul {
        display: none;
    }
}

/* Gauge Animation */
@keyframes gauge-fill {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(var(--rotation));
    }
}
/* Add these styles to your existing CSS */

/* Scheduling and Alerts */
.scheduling, .alerts, .zones {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.schedule-list, .alert-list, .zone-list {
    margin-top: 1rem;
}

.schedule-item, .alert-item, .zone-item {
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.schedule-item:hover, .zone-item:hover {
    background-color: var(--light-color);
}

.alert-item {
    background-color: #fff3e0;
    border-left: 4px solid #ff9800;
}

.alert-item.warning {
    background-color: #fff3e0;
    border-left-color: #ff9800;
}

.alert-item.error {
    background-color: #ffebee;
    border-left-color: #f44336;
}

.alert-item.info {
    background-color: #e3f2fd;
    border-left-color: #2196f3;
}

.alert-item.success {
    background-color: #e8f5e9;
    border-left-color: #4caf50;
}

.schedule-details, .zone-details {
    flex-grow: 1;
}

.schedule-actions, .zone-actions {
    display: flex;
    gap: 0.5rem;
}

.day-selector {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.day-selector label {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: var(--primary-color);
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: none;
}

.toast-content {
    background-color: #333;
    color: white;
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    min-width: 250px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.toast-close {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
}

.toast-icon {
    margin-right: 1rem;
    font-size: 1.5rem;
}

.toast-message {
    flex-grow: 1;
}

.toast.success {
    background-color: var(--primary-color);
}

.toast.error {
    background-color: #f44336;
}

.toast.warning {
    background-color: #ff9800;
}

.toast.info {
    background-color: #2196f3;
}

/* Water Usage Stats */
.water-usage {
    margin-top: 2rem;
}

.usage-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.usage-stat {
    background-color: var(--white);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.usage-stat h4 {
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.usage-stat p {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
}

/* Zone Management */
.zone-item {
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.zone-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.zone-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.zone-name {
    font-weight: bold;
}

.zone-description {
    font-size: 0.9rem;
    color: var(--dark-gray);
}

.zone-stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.zone-stat {
    font-size: 0.8rem;
    background-color: var(--light-color);
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
}