/* ==========================================================================
   Race Terra - Main Stylesheet
   Professional garden tools company website
   ========================================================================== */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #2d3748;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
    color: #4a5568;
}

a {
    color: #2f855a;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #38a169;
}

/* Color Palette - French Garden Theme */
:root {
    --primary-green: #2f855a;
    --primary-green-light: #38a169;
    --primary-green-dark: #276749;
    --secondary-brown: #8b4513;
    --secondary-brown-light: #a0522d;
    --accent-gold: #d4af37;
    --earth-beige: #f7fafc;
    --earth-gray: #e2e8f0;
    --text-dark: #1a202c;
    --text-medium: #2d3748;
    --text-light: #4a5568;
    --white: #ffffff;
    --success: #38a169;
    --warning: #d69e2e;
    --error: #e53e3e;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

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

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    line-height: 1.5;
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-green-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 133, 90, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-brown);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--secondary-brown-light);
    color: var(--white);
}

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

.btn-outline:hover {
    background-color: var(--primary-green);
    color: var(--white);
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    height: 50px;
    width: auto;
}

.logo-link {
    display: flex;
    align-items: center;
}

.main-nav {
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
}

.nav-link {
    color: var(--text-medium);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-green);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-green);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-medium);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 8rem 0 4rem;
    background: linear-gradient(135deg, var(--earth-beige) 0%, #f0f7f4 100%);
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3rem;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2rem;
}

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

.hero-image {
    text-align: center;
}

.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem;
}

/* About Section */
.about {
    padding: 5rem 0;
    background-color: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.about-text h3:first-child {
    margin-top: 0;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
    background-color: var(--earth-beige);
    border-radius: 1rem;
    transition: transform 0.3s ease;
}

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

.feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.feature h4 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

/* Services Section */
.services {
    padding: 5rem 0;
    background-color: var(--earth-beige);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.service-card ul {
    list-style: none;
    margin-top: 1rem;
}

.service-card li {
    padding: 0.5rem 0;
    color: var(--text-light);
    position: relative;
    padding-left: 1.5rem;
}

.service-card li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
}

/* Products Section */
.products {
    padding: 5rem 0;
    background-color: var(--white);
}

.product-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.category {
    background-color: var(--earth-beige);
    padding: 2rem;
    border-radius: 1rem;
}

.category h3 {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    text-align: center;
}

.product-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.product-item {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-green);
}

.product-item h4 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.product-item p {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Testimonials Section */
.testimonials {
    padding: 5rem 0;
    background-color: var(--earth-beige);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: var(--primary-green);
    opacity: 0.3;
}

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    color: var(--text-medium);
}

.testimonial-author strong {
    color: var(--primary-green);
    display: block;
}

.testimonial-author span {
    color: var(--text-light);
    font-size: 0.875rem;
}

/* Newsletter Section */
.newsletter {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-dark) 100%);
    color: var(--white);
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.newsletter p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.newsletter-form input[type="email"] {
    flex: 1;
    max-width: 300px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 0.375rem;
    font-size: 1rem;
}

.form-options {
    display: flex;
    justify-content: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
}

.checkbox-label input[type="checkbox"] {
    margin: 0;
}

.checkbox-label a {
    color: var(--accent-gold);
}

.form-message {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
}

.form-message.success {
    background-color: rgba(56, 161, 105, 0.2);
    color: var(--white);
    border: 1px solid rgba(56, 161, 105, 0.5);
}

.form-message.error {
    background-color: rgba(229, 62, 62, 0.2);
    color: var(--white);
    border: 1px solid rgba(229, 62, 62, 0.5);
}

/* Contact Section */
.contact {
    padding: 5rem 0;
    background-color: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item h3 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.contact-item p {
    margin: 0;
}

.contact-item a {
    color: var(--text-medium);
}

.contact-item a:hover {
    color: var(--primary-green);
}

.contact-form {
    background-color: var(--earth-beige);
    padding: 2rem;
    border-radius: 1rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--earth-gray);
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(47, 133, 90, 0.1);
}

/* Footer */
.footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

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

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-settings-link {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 0.875rem;
    text-decoration: underline;
}

.cookie-settings-link:hover {
    color: var(--white);
}

/* Cookie Management */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--white);
    border-top: 1px solid var(--earth-gray);
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    z-index: 2000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content h3 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.cookie-content p {
    margin-bottom: 1rem;
    color: var(--text-medium);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 3000;
}

.cookie-modal.show {
    display: flex;
}

.modal-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    margin: 1rem;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--earth-beige);
    border-radius: 0.5rem;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-weight: 500;
}

.cookie-toggle input[type="checkbox"] {
    position: relative;
    width: 50px;
    height: 25px;
    appearance: none;
    background-color: var(--earth-gray);
    border-radius: 25px;
    transition: background-color 0.3s ease;
}

.cookie-toggle input[type="checkbox"]:checked {
    background-color: var(--primary-green);
}

.cookie-toggle input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 21px;
    height: 21px;
    background-color: var(--white);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.cookie-toggle input[type="checkbox"]:checked::before {
    transform: translateX(25px);
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Legal Pages */
.legal-page {
    padding: 6rem 0 3rem;
    background-color: var(--white);
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.last-updated {
    color: var(--text-light);
    font-style: italic;
    margin-bottom: 2rem;
}

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

.legal-section h2 {
    color: var(--primary-green);
    border-bottom: 2px solid var(--earth-gray);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.legal-section h3 {
    color: var(--text-dark);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.legal-section ul,
.legal-section ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-section li {
    margin-bottom: 0.5rem;
    color: var(--text-medium);
}

/* Thank You Page */
.thank-you-page {
    padding: 6rem 0 3rem;
    background-color: var(--earth-beige);
    min-height: 80vh;
}

.thank-you-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.thank-you-icon {
    margin-bottom: 2rem;
}

.thank-you-message {
    font-size: 1.125rem;
    margin-bottom: 3rem;
    color: var(--text-medium);
}

.what-next {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 3rem;
    text-align: left;
}

.what-next h2 {
    text-align: center;
    color: var(--primary-green);
    margin-bottom: 2rem;
}

.next-steps {
    display: grid;
    gap: 1.5rem;
}

.step {
    padding: 1rem;
    background-color: var(--earth-beige);
    border-radius: 0.5rem;
}

.step h3 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.thank-you-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.newsletter-info {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    text-align: left;
}

.newsletter-info h3 {
    color: var(--primary-green);
    text-align: center;
    margin-bottom: 1rem;
}

.newsletter-info ul {
    list-style: none;
    margin: 0;
}

.newsletter-info li {
    padding: 0.5rem 0;
    color: var(--text-medium);
}

/* Cookie Policy Tables */
.cookie-table {
    margin: 1rem 0;
    overflow-x: auto;
}

.cookie-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    border-radius: 0.5rem;
    overflow: hidden;
}

.cookie-table th,
.cookie-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--earth-gray);
}

.cookie-table th {
    background-color: var(--primary-green);
    color: var(--white);
    font-weight: 600;
}

.cookie-table tr:last-child td {
    border-bottom: none;
}

.cookie-management-panel {
    background-color: var(--earth-beige);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    margin: 2rem 0;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 1rem;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 2rem;
}

.hidden {
    display: none;
}

.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;
}

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

.spinner {
    border: 2px solid var(--earth-gray);
    border-top: 2px solid var(--primary-green);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth Transitions */
section {
    transition: opacity 0.3s ease;
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .cookie-banner,
    .cookie-modal {
        display: none;
    }
    
    .legal-page,
    .thank-you-page {
        padding-top: 2rem;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
}
