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

body {
    font-family: 'Montserrat', sans-serif;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Global link styles */
a {
    color: #4CAF50;
    text-decoration: underline;
    transition: color 0.2s;
}

a:hover {
    color: #2E7D32;
    text-decoration: underline;
}

.container {
    max-width: 1200px;
    width: 90%;
    margin: 0 auto;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Typography */
.site-name {
    font-size: 2.5rem;
    margin-bottom: 0.25rem;
    color: #2E7D32;
    letter-spacing: 1px;
    font-weight: bold;
}

.site-tagline {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #4CAF50;
    font-style: italic;
    letter-spacing: 0.5px;
}

h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #2E7D32;
    letter-spacing: 1px;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #4CAF50;
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

/* Layout Sections */
.site-header {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.header-top {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.logo-container {
    flex: 0 0 auto;
    margin-right: 2rem;
}

.title-container {
    flex: 1 1 auto;
}

/* Main Navigation */
.main-nav {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 0.75rem 0;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    justify-content: center;
}

.nav-menu li a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.95rem;
}

.nav-menu li a:hover {
    color: #2E7D32;
}

.nav-menu li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #4CAF50;
    transition: width 0.3s;
}

.nav-menu li a:hover::after {
    width: 100%;
}

.main-logo {
    max-width: 100%;
    height: auto;
    width: 180px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Mobile layout for header */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        width: 100%;
    }
    
    .logo-container {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .title-container {
        text-align: center;
    }
    
    .nav-menu {
        flex-wrap: wrap;
        gap: 1.5rem;
        padding: 0 0.5rem;
        justify-content: center;
    }
    
    .nav-menu li {
        margin-bottom: 0.5rem;
    }
}

main {
    margin-bottom: 2rem;
}

.coming-soon {
    padding: 1.5rem 0;
}

footer {
    font-size: 0.9rem;
    color: #666;
    padding: 2rem 0 1rem;
    border-top: 1px solid #eee;
    text-align: left;
    margin-top: 2rem;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.footer-columns {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    padding-right: 20px;
    margin-bottom: 1.5rem;
}

.footer-column h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    color: #4CAF50;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-column ul li a {
    color: #4CAF50;
    text-decoration: underline;
    transition: color 0.2s;
}

.footer-column ul li a:hover {
    color: #2E7D32;
    text-decoration: underline;
}

.social-links a {
    color: #4CAF50;
    text-decoration: underline;
    transition: color 0.2s;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.social-links a:hover {
    color: #2E7D32;
    text-decoration: underline;
}

.copyright {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    font-size: 0.9rem;
    color: #999;
}

/* Responsive footer */
@media (max-width: 768px) {
    .footer-column {
        min-width: 100%;
        padding-right: 0;
    }
}

/* Blog post styles */
.blog-post {
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
}

.post-meta {
    color: #666;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.featured-image {
    margin: 1.5rem 0 2rem;
}

.featured-image img {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.post-content {
    margin-bottom: 3rem;
}

.post-content h3 {
    color: #4CAF50;
    margin: 2rem 0 1rem;
    font-size: 1.5rem;
}

.post-content figure {
    margin: 2rem 0;
}

.post-content figure img {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.post-content figcaption {
    color: #666;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.post-navigation a {
    color: #4CAF50;
    text-decoration: none;
    font-weight: bold;
}

.post-navigation a:hover {
    text-decoration: underline;
}

/* Photo Gallery Styles */
.photo-gallery {
    margin: 3rem 0;
}

.gallery-container {
    position: relative;
    margin: 2rem 0;
}

.gallery-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 1rem;
}

.gallery-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 40px;
    overflow: hidden;
}

.gallery-modal.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-content {
    position: relative;
    max-width: 100%;
    max-height: 80vh;
    margin: 0 auto;
}

.modal-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
}

.modal-caption {
    color: white;
    text-align: center;
    margin-top: 1rem;
    padding: 0 1rem;
}

.modal-counter {
    color: white;
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev,
.modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 30px;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .modal-prev,
    .modal-next {
        width: 40px;
        height: 40px;
    }
    
    .gallery-modal {
        padding: 15px;
    }
}

/* Blog entries list */
.blog-entries h3 {
    color: #4CAF50;
    margin-top: 1.5rem;
}

.post-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.post-list li {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
}

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

.post-list a {
    color: #2E7D32;
    text-decoration: none;
    font-weight: 600;
}

.post-list a:hover {
    text-decoration: underline;
}

/* Country list styling */
.country-list {
    columns: 3;
    column-gap: 2rem;
    list-style: none;
    padding-left: 0;
    margin: 2rem 0;
}

.country-list li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dotted #eee;
    break-inside: avoid-column;
}

@media (max-width: 992px) {
    .country-list {
        columns: 2;
    }
}

@media (max-width: 576px) {
    .country-list {
        columns: 1;
    }
}

/* HTML5 Expense Table Styling */
.expense-table {
    margin: 2rem 0;
    overflow-x: auto;
    font-size: 0.95rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.expense-header {
    display: flex;
    background-color: #e8f5e9; /* Light green background instead of dark green */
    color: #000; /* Black text instead of white */
    font-weight: bold;
    padding: 12px 10px;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.expense-row {
    display: flex;
    border-bottom: 1px solid #ddd;
    padding: 10px;
    align-items: center;
}

.expense-col {
    flex: 1;
    padding: 0 5px;
}

.date-col {
    flex: 0.7;
    font-weight: 500;
}

/* Details & Summary elements styling */
.expense-month-container {
    border-bottom: 1px solid #ddd;
    margin-bottom: 0;
}

summary.expense-month {
    background-color: #f5f5f5;
    font-weight: bold;
    padding: 12px 10px;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    transition: background-color 0.2s;
}

summary.expense-month:hover {
    background-color: #e5e5e5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

summary.expense-month::-webkit-details-marker {
    display: none;
}

summary.expense-month::before {
    content: "▼";
    font-size: 0.9rem;
    color: white;
    background-color: #4CAF50;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

details[open] summary.expense-month::before {
    content: "▲";
}

.month-name {
    font-size: 1.05rem;
    margin-right: 1rem;
}

.expense-total {
    background-color: #e8f5e9;
    font-weight: bold;
}

.expense-total-row {
    font-weight: bold;
    background-color: #e8f5e9;
    border-bottom: 2px solid #4CAF50;
    position: relative;
    margin-top: 10px;
}

.expense-total-row::after {
    content: "MONTH TOTAL";
    position: absolute;
    top: 0;
    right: 10px;
    font-size: 0.7rem;
    color: #4CAF50;
    padding: 2px 4px;
    opacity: 0.7;
}

.expense-note {
    background-color: #fffde7;
    font-style: italic;
    text-align: center;
    font-size: 0.9rem;
}

.month-details {
    padding: 0 0 0 30px;
}

.expense-grand-total {
    margin-top: 1rem;
    border-top: 2px solid #4CAF50;
}

.daily-expense:hover {
    background-color: #f9f9f9;
}

/* Make details elements mobile-friendly */
@media (max-width: 768px) {
    .expense-row, .expense-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .expense-col {
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 5px 0;
        border-bottom: 1px dashed #eee;
    }
    
    .expense-header {
        display: none;
    }
    
    .date-col {
        border-bottom: none;
        font-size: 1.1em;
        font-weight: bold;
    }
    
    .expense-col:last-child {
        border-bottom: none;
    }
    
    .month-total-preview {
        width: 100%;
        margin-left: 30px;
        margin-top: 5px;
    }
}

/* Text alignment */
h1, h2 {
    text-align: center;
}

/* Cycling Stats */
.cycling-stats {
    background-color: #f8f8f8;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    border-left: 4px solid #4CAF50;
}

.cycling-stats h3 {
    color: #2E7D32;
    margin-top: 0;
    margin-bottom: 1rem;
}

.cycling-stats ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.cycling-stats li {
    margin-bottom: 0.7rem;
    display: flex;
    align-items: center;
}

.cycling-stats li:last-child {
    margin-bottom: 0;
}

.cycling-stats li:before {
    content: '🚴';
    margin-right: 0.7rem;
    font-size: 1.2rem;
}

.cycling-stats li strong {
    margin-right: 0.5rem;
}

.intro {
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
}

/* Responsive Styles */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .intro {
        max-width: 1100px;
    }
}

@media (max-width: 768px) {
    .site-name {
        font-size: 2rem;
    }
    
    .site-tagline {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    p {
        font-size: 1rem;
    }
    
    .container {
        padding: 1.5rem;
        width: 95%;
    }
    
    .featured-image img {
        max-height: 300px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .container {
        padding: 1rem;
        width: 100%;
    }
}

/* Expense table collapsible features */
.collapsible {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s;
    padding: 8px 12px !important;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.collapsible:hover {
    background-color: #e5e5e5;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.collapsible:after {
    content: 'Click to expand/collapse';
    position: absolute;
    top: 2px;
    right: 5px;
    font-size: 0.7rem;
    color: #888;
    font-style: italic;
    font-weight: normal;
    opacity: 0;
    transition: opacity 0.2s;
}

.collapsible:hover:after {
    opacity: 1;
}

.toggle-icon {
    margin-left: 0.5rem;
    font-size: 0.9rem;
    color: white;
    background-color: #4CAF50;
    display: inline-block;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    border-radius: 50%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.month-total-preview {
    font-size: 0.85rem;
    font-weight: normal;
    display: block;
    margin-top: 5px;
    color: #555;
    padding-left: 20px;
}

.month-details.collapsed {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    opacity: 0 !important;
}

.expense-month {
    position: relative;
    background-color: #f0f0f0;
    font-weight: bold;
}
/* Trip Statistics Styles */
.trip-stats {
    margin: 2rem 0;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 8px;
}

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

.stats-card {
    background-color: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.stats-card h3 {
    margin-top: 0;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.stats-card ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.stats-card li {
    margin-bottom: 0.5rem;
}

/* Expense Table Styles */
.expense-table {
    overflow-x: auto;
    margin: 2rem 0;
}

.expense-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.expense-table th, 
.expense-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.expense-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #000;
}

.expense-month {
    background-color: #f0f0f0;
    font-weight: bold;
}

.expense-total {
    font-weight: bold;
    background-color: #f9f9f9;
}

.expense-total-row {
    font-weight: bold;
    background-color: #e8f5e9;
    border-bottom: 2px solid #4CAF50;
    position: relative;
}

.expense-total-row::after {
    content: "MONTH TOTAL";
    position: absolute;
    top: 0;
    right: 0;
    font-size: 0.7rem;
    color: #4CAF50;
    padding: 2px 4px;
    opacity: 0.7;
}

.expense-note {
    font-style: italic;
    text-align: right;
    font-size: 0.8rem;
    color: #666;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .expense-table {
        font-size: 0.8rem;
    }
    
    .expense-table th, 
    .expense-table td {
        padding: 0.5rem;
    }
}
