/* ===== 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: #333;
    background-color: #F8FFF8;
}

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

h1 {
    font-size: 2.5rem;
    color: #6B8A4F;
}

h2 {
    font-size: 2.25rem;
    color: #87A96B;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.5rem;
    color: #87A96B;
    margin-bottom: 1rem;
}

h4 {
    font-size: 1.25rem;
    color: #87A96B;
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

a {
    color: #87A96B;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: #6B8A4F;
    text-decoration: underline;
}

ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

address {
    font-style: normal;
    line-height: 1.7;
}

/* ===== LAYOUT CONTAINERS ===== */
.header-container,
.page-content,
.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== HEADER STYLES ===== */
.site-header {
    background: linear-gradient(135deg, #6B8A4F 0%, #87A96B 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.tagline {
    color: #c5cae9;
    font-size: 0.9rem;
    margin-bottom: 0;
    font-weight: 300;
}

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

.main-nav a {
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
}

.main-nav a:hover,
.main-nav a:focus {
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: white;
}

/* ===== PAGE SWITCHING LOGIC ===== */
.page-section {
    display: none;
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
    animation: fadeIn 0.5s ease-in-out;
}

/* Show home page by default */
.page-section.home-page {
    display: block;
}

/* Show targeted page */
.page-section:target {
    display: block;
}

/* Hide home page when any other page is targeted */
.page-section:target ~ .home-page {
    display: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== HOME PAGE STYLES ===== */
.hero-section {
    background: linear-gradient(135deg, #e8eaf6 0%, #f3e5f5 100%);
    border-radius: 12px;
    padding: 4rem 2rem;
    margin-bottom: 3rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.hero-content h2 {
    font-size: 2.75rem;
    color: #6B8A4F;
    text-align: center;
    margin-bottom: 1.5rem;
}

.hero-description {
    font-size: 1.25rem;
    text-align: center;
    color: #424242;
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.8;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.feature h3 {
    color: #87A96B;
    margin-bottom: 1rem;
}

.feature p {
    color: #666;
    margin-bottom: 0;
}

/* ===== CONTENT PAGES STYLES ===== */
.page-content {
    background: white;
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.about-content {
    display: grid;
    gap: 3rem;
}

.company-story,
.services,
.expertise {
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #87A96B;
}

.services-list {
    list-style: none;
    margin-left: 0;
}

.services-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e0e0e0;
}

.services-list li:last-child {
    border-bottom: none;
}

/* ===== CONTACT PAGE STYLES ===== */
.contact-content {
    display: grid;
    gap: 2rem;
}

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

.contact-item {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    border-left: 4px solid #87A96B;
}

.contact-item h3 {
    color: #87A96B;
    margin-bottom: 1rem;
}

.contact-item address {
    color: #666;
}

/* ===== LEGAL PAGES STYLES ===== */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h3 {
    color: #87A96B;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8f5e8;
}

.legal-content p {
    text-align: justify;
    line-height: 1.8;
}

.legal-content ul {
    margin-bottom: 1.5rem;
}

.legal-content li {
    line-height: 1.7;
}

/* ===== FOOTER STYLES ===== */
.site-footer {
    background: #6B8A4F;
    color: white;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #c5cae9;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

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

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

.footer-section a {
    color: #e8eaf6;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: white;
    text-decoration: none;
}

.footer-section p {
    color: #c5cae9;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .main-nav a {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .hero-section {
        padding: 2rem 1rem;
    }
    
    .page-content {
        padding: 2rem 1rem;
        margin: 0 1rem 2rem;
    }
    
    .header-container,
    .footer-container {
        padding: 0 1rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-nav ul {
        gap: 0.5rem;
    }
    
    .main-nav a {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
    
    .hero-content h2 {
        font-size: 1.75rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .feature {
        padding: 1.5rem;
    }
    
    .contact-item {
        padding: 1.5rem;
    }
    
    .page-content {
        padding: 1.5rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .site-header,
    .site-footer,
    .main-nav {
        display: none;
    }
    
    .page-section {
        display: block !important;
        page-break-before: always;
        box-shadow: none;
        background: white;
    }
    
    .page-section:first-of-type {
        page-break-before: auto;
    }
    
    .hero-section {
        background: white;
        box-shadow: none;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .feature {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid #87A96B;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero-section {
        background: white;
        border: 2px solid #000;
    }
    
    .feature {
        border: 2px solid #000;
    }
    
    .contact-item,
    .company-story,
    .services,
    .expertise {
        border: 2px solid #000;
        background: white;
    }
}

/* ===== UTILITY CLASSES ===== */
.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;
}

/* ===== ENHANCED VISUAL POLISH ===== */
.page-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.page-section.home-page,
.page-section:target {
    opacity: 1;
    transform: translateY(0);
}

/* Loading state for smooth transitions */
.main-content {
    min-height: 60vh;
}

/* Enhanced hover effects */
.main-nav a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.main-nav a:hover::before,
.main-nav a:focus::before {
    opacity: 1;
}
