/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Layout container */
:root {
  --layout-max-width: 1200px;
  --layout-padding: 24px;
}

.layout-container {
  width: min(100%, var(--layout-max-width));
  margin: 0 auto;
  padding: 0 var(--layout-padding);
}

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

.center .layout-container {
  text-align: center;
}

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

/* Main content wrapper */
.hero, .about, .services, .contact, .blog, .map {
    flex: 1 0 auto;
}

/* Alignment classes */
.left {
    text-align: left;
}

.center {
    text-align: center;
}

.right {
    text-align: right;
}

/* Header */
.header {
    background: #10b981;
    color: white;
  padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.header h1 {
    margin-bottom: 5px;
    font-size: 28px;
}

.header-subtitle {
    margin: 0 0 10px 0;
    font-size: 14px;
    opacity: 0.9;
    font-style: italic;
}

.header nav {
    margin-top: 15px;
}

.header nav a {
    color: white;
    text-decoration: none;
    margin: 0 10px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background 0.3s;
}

.header nav a:hover {
    background: #059669;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: white;
  padding: 60px 0;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 16px;
}

.hero p {
    font-size: 20px;
    opacity: 0.9;
}

/* About, Services, Contact, Blog, Map Sections */
.about, .services, .contact, .blog, .map {
  padding: 60px 0;
}

.about h2, .services h2, .contact h2, .blog h2, .map h2 {
    font-size: 32px;
    margin-bottom: 16px;
    color: #10b981;
}

.about p, .services p, .contact p {
    font-size: 16px;
    line-height: 1.8;
    color: #666;
}

/* Blog Section */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.blog-post {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden !important;
    word-wrap: break-word;
    max-width: 100%;
}

.blog-post:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.blog-post-date {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
}

.blog-post h3 {
    font-size: 20px;
    margin-bottom: 8px;
    color: #1f2937;
    overflow: hidden !important;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    word-break: break-word;
    line-height: 1.4;
    max-width: 100%;
}

.blog-post-description {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 12px;
    overflow: hidden !important;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    word-break: break-word;
    line-height: 1.5;
    max-width: 100%;
}

.blog-post-content {
    font-size: 15px;
    line-height: 1.6;
    color: #374151;
    overflow: hidden !important;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    word-break: break-word;
    max-width: 100%;
}

.blog-more {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 12px;
    padding: 32px 24px;
    text-align: center;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.blog-more p {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.btn-view-all {
    display: inline-block;
    padding: 12px 32px;
    background: white;
    color: #10b981;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-view-all:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Blog Page Styles */
.blog-page {
  padding: 40px 0;
    flex: 1 0 auto;
    min-height: calc(100vh - 200px);
}

.blog-search-container {
    margin-bottom: 32px;
}

.blog-search {
    width: 100%;
    max-width: 600px;
    padding: 16px 24px;
    font-size: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: border-color 0.3s ease;
}

.blog-search:focus {
    outline: none;
    border-color: #10b981;
}

/* Map Section */
.map {
  padding: 40px 0;
}

.map h2 {
  font-size: 32px;
  margin-bottom: 24px;
  color: #10b981;
}

#map {
    width: 100% !important;
    height: 500px !important;
  margin: 24px 0 0 0;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    background: #f9fafb;
    position: relative;
    z-index: 1;
    display: block;
}

/* Ensure Leaflet container takes full size */
.leaflet-container {
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px;
}

/* Footer */
.footer {
    background: #1a1a2e;
    color: white;
  padding: 20px 0;
    margin-top: auto;
    flex-shrink: 0;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
}

.footer p {
    opacity: 0.8;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  :root {
    --layout-padding: 16px;
  }

  .hero {
    padding: 40px 0;
  }

    .hero h1 {
        font-size: 32px;
    }
    
  .about, .services, .contact, .blog, .map {
    padding: 40px 0;
    }
    
  .about h2, .services h2, .contact h2, .blog h2, .map h2 {
        font-size: 24px;
    }
    
    #map {
        width: 100% !important;
        height: 350px !important;
    }
    
    .header nav {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }
    
    .header nav a {
        display: block;
        padding: 8px 12px;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 2rem 0;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background: #10b981;
    color: white;
    border-color: #10b981;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-pages {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-page {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination-page:hover {
    background: #f3f4f6;
    border-color: #10b981;
}

.pagination-page.active {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

@media (max-width: 768px) {
    .pagination-container {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .pagination-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .pagination-page {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }
}