/* ============================================
   Mahasapak Website - Modern Stylesheet
   Color Palette:
   - Primary Green: #2D7A4A
   - Light Green: #7CB342
   - Accent White: #FFFFFF
   - Text: #000000
   ============================================ */

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

:root {
    --primary-green: #2D7A4A;
    --light-green: #7CB342;
    --white: #FFFFFF;
    --black: #000000;
    --gray-light: #F5F5F5;
    --gray-medium: #CCCCCC;
    --gray-dark: #666666;
    --transition-speed: 0.3s;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --box-shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--black);
    background-color: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-green);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

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

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

a:hover {
    color: var(--light-green);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   Navigation Header
   ============================================ */
.header {
    background-color: var(--white);
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-speed) ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo:hover {
    color: var(--light-green);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--black);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all var(--transition-speed) ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-green);
    background-color: var(--gray-light);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background-color: var(--light-green);
    transition: transform var(--transition-speed) ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-green);
    padding: 0.5rem;
}

/* ============================================
   Container & Layout
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
    color: var(--primary-green);
}

.section-subtitle {
    text-align: center;
    color: var(--gray-dark);
    font-size: 1.1rem;
    margin-top: -2rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 100%);
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,%3Csvg width="100" height="100" xmlns="http://www.w3.org/2000/svg"%3E%3Ccircle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/%3E%3C/svg%3E');
    opacity: 0.3;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: 2px solid transparent;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-green);
    color: var(--white);
    border-color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

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

.btn-secondary:hover {
    background-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow-hover);
}

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

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

/* ============================================
   Grid Layouts
   ============================================ */
.grid {
    display: grid;
    gap: 2rem;
}

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

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* ============================================
   Cards
   ============================================ */
.card {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    transition: all var(--transition-speed) ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: var(--white);
}

.card-title {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.card-text {
    color: var(--gray-dark);
    flex-grow: 1;
}

.card-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-medium);
}

/* ============================================
   Features Section
   ============================================ */
.features {
    background-color: var(--gray-light);
}

.feature-card {
    text-align: center;
}

.feature-icon {
    margin: 0 auto 1.5rem;
}

/* ============================================
   Services Section
   ============================================ */
.service-card {
    border: 2px solid var(--gray-light);
    transition: all var(--transition-speed) ease;
}

.service-card:hover {
    border-color: var(--light-green);
}

.service-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
    margin: 1rem 0;
}

.service-features {
    list-style: none;
    margin: 1.5rem 0;
}

.service-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.service-features li::before {
    content: '✓';
    color: var(--light-green);
    font-weight: 700;
    font-size: 1.2rem;
}

/* ============================================
   Testimonials Section
   ============================================ */
.testimonials {
    background-color: var(--gray-light);
}

.testimonial-card {
    text-align: center;
    font-style: italic;
}

.testimonial-text {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--gray-dark);
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-green);
    font-style: normal;
}

.testimonial-role {
    color: var(--gray-dark);
    font-size: 0.9rem;
    font-style: normal;
}

/* ============================================
   Team Section
   ============================================ */
.team-member {
    text-align: center;
}

.team-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 3rem;
    font-weight: 700;
}

.team-name {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.team-position {
    color: var(--gray-dark);
    margin-bottom: 1rem;
}

/* ============================================
   Newsletter Section
   ============================================ */
.newsletter {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: var(--white);
    padding: 4rem 2rem;
    text-align: center;
}

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

.newsletter p {
    margin-bottom: 2rem;
    opacity: 0.95;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.newsletter-form button {
    padding: 0.875rem 2rem;
    background-color: var(--white);
    color: var(--primary-green);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.newsletter-form button:hover {
    background-color: var(--primary-green);
    color: var(--white);
    border: 2px solid var(--white);
}

/* ============================================
   Forms
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-green);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--gray-medium);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-speed) ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--light-green);
    box-shadow: 0 0 0 3px rgba(124, 179, 66, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.form-error {
    color: #d32f2f;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-input.error,
.form-textarea.error,
.form-select.error {
    border-color: #d32f2f;
}

.form-input.error + .form-error,
.form-textarea.error + .form-error,
.form-select.error + .form-error {
    display: block;
}

/* ============================================
   Contact Section
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

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

.contact-item {
    display: flex;
    align-items: start;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-details h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.contact-details p {
    margin: 0;
    color: var(--gray-dark);
}

.map-container {
    margin-top: 3rem;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.map-container iframe {
    width: 100%;
    height: 400px;
    border: none;
}

/* ============================================
   Social Links
   ============================================ */
.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    background-color: var(--primary-green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-speed) ease;
    font-size: 1.25rem;
}

.social-link:hover {
    background-color: var(--light-green);
    transform: translateY(-3px);
    box-shadow: var(--box-shadow-hover);
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

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

.footer-section h3 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    line-height: 2;
}

.footer-section a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-links {
    list-style: none;
}

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

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   404 Page
   ============================================ */
.error-page {
    text-align: center;
    padding: 6rem 2rem;
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-code {
    font-size: 8rem;
    font-weight: 700;
    color: var(--light-green);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-message {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--gray-dark);
}

.error-description {
    font-size: 1.1rem;
    color: var(--gray-dark);
    margin-bottom: 2rem;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.6s ease;
}

.fade-in-up {
    animation: fadeInUp 0.8s ease;
}

/* ============================================
   Map Section - Find Us On Map
   ============================================ */
.map-section {
    padding: 40px 20px;
    background-color: #f5f5f5;
    margin-top: 40px;
}

.map-section h2 {
    text-align: center;
    color: #2D7A4A;
    margin-bottom: 30px;
    font-size: 28px;
}

.map-section .map-container {
    max-width: 100%;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.map-section .map-container iframe {
    width: 100%;
    height: 400px;
    border: 3px solid #2D7A4A;
    border-radius: 8px;
}

.directions-button-container {
    text-align: center;
    margin-top: 20px;
}

.btn-directions {
    display: inline-block;
    background-color: #2D7A4A;
    color: white;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s ease;
    cursor: pointer;
}

.btn-directions:hover {
    background-color: #7CB342;
    text-decoration: none;
    color: white;
}

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

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

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

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ============================================
   Responsive Design - Mobile First
   ============================================ */

/* Tablets and Small Desktops */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: left 0.3s ease;
        box-shadow: var(--box-shadow);
        padding: 2rem 0;
        gap: 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        width: 100%;
        padding: 1rem 2rem;
        border-radius: 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.35rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        min-width: 100%;
    }
    
    .error-code {
        font-size: 5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .map-section .map-container iframe {
        height: 300px;
    }
    
    .map-section h2 {
        font-size: 22px;
    }
    
    .btn-directions {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .nav-container {
        padding: 1rem;
    }
    
    .hero {
        padding: 4rem 1rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    .header,
    .mobile-menu-toggle,
    .newsletter,
    .footer {
        display: none;
    }
    
    body {
        color: #000;
    }
    
    a {
        text-decoration: underline;
    }
}

/* ============================================
   Accessibility
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid var(--light-green);
    outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
