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

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #3a2f1f;
    background-color: #f9f3e9;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background-color: #8b5e34;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

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

.logo img {
    width: 100px;
    height: auto;
}

.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
}

.nav ul {
    display: flex;
    list-style: none;
}

.nav ul li {
    margin-left: 25px;
}

.nav ul li a {
    color: #fff;
    text-decoration: none;
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav ul li a:hover {
    color: #f4a261;
}

.phone-number a {
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none;
    font-weight: bold;
}

.phone-number a:hover {
    color: #f4a261;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
        position: relative;
    }

    .logo {
        flex: 1;
    }

    .nav-toggle-label {
        display: block;
        width: 30px;
        height: 25px;
        cursor: pointer;
        position: relative;
        z-index: 101;
    }

    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        content: '';
        display: block;
        width: 100%;
        height: 3px;
        background-color: #fff;
        position: absolute;
        transition: all 0.3s ease;
    }

    .nav-toggle-label span {
        top: 50%;
        transform: translateY(-50%);
    }

    .nav-toggle-label span::before {
        top: -10px;
    }

    .nav-toggle-label span::after {
        top: 10px;
    }

    .nav-toggle:checked + .nav-toggle-label span {
        background-color: transparent;
    }

    .nav-toggle:checked + .nav-toggle-label span::before {
        transform: translateY(10px) rotate(45deg);
    }

    .nav-toggle:checked + .nav-toggle-label span::after {
        transform: translateY(-10px) rotate(-45deg);
    }

    .nav {
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #8b5e34;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .nav-toggle:checked ~ .nav {
        max-height: 400px; /* Increased from 300px to fit all items */
    }

    .nav ul {
        flex-direction: column;
        padding: 20px;
    }

    .nav ul li {
        margin: 15px 0; /* Slightly increased for better spacing */
    }

    .phone-number {
        margin-left: auto;
    }
}

/* Hero */
.hero {
    background: url('../Website_Pictures/five_horse_riders_at_borderfence.jpeg') no-repeat center/cover; /* Add a hero image if you have one */
    padding: 100px 0;
    text-align: center;
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-text h1 {
    font-family: 'Georgia', serif;
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-text p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-primary {
    background-color: #e76f51;
    color: #fff;
}

.btn-primary:hover {
    background-color: #d65c3f;
    transform: scale(1.05);
}

.btn-secondary {
    background-color: #2a9d8f;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #238c80;
    transform: scale(1.05);
}

/* Tours */
.tours {
    padding: 60px 0;
    background-color: #fff;
    text-align: center;
}

.tours h2 {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    color: #8b5e34;
    margin-bottom: 40px;
}

.tour-details {
    max-width: 600px;
    margin: 0 auto;
}

.tour-details h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.tour-details p {
    margin-bottom: 15px;
}

/* Indy Foal Watch */
.foal-watch {
    padding: 60px 0;
    background-color: #f9f3e9;
    text-align: center;
}

.foal-watch h2 {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    color: #8b5e34;
    margin-bottom: 40px;
}

.foal-profile {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto;
}

.foal-watch .foal-profile img {
    width: 100%;
    height: 200px;
    max-height: 200px;
    object-fit: cover;
    display: block;
}

.foal-details {
    padding: 20px;
    text-align: left;
}

.foal-details h3 {
    font-size: 1.6rem;
    color: #2a9d8f;
    margin-bottom: 10px;
}

.foal-details p {
    margin-bottom: 10px;
}

.foal-details a {
    color: #e76f51;
    text-decoration: none;
    font-weight: bold;
}

.foal-details a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .foal-profile {
        max-width: 100%;
    }

    .foal-watch .foal-profile img {
        height: 250px;
        max-height: 250px;
    }
}

/* Horses */
.horses {
    padding: 60px 0;
    background-color: #f9f3e9;
}

.horses h2 {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    color: #8b5e34;
    text-align: center;
    margin-bottom: 40px;
}

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

.horse-profile {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.horse-profile img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.horse-details {
    padding: 20px;
}

.horse-details h3 {
    font-size: 1.6rem;
    color: #2a9d8f;
    margin-bottom: 10px;
}

.horse-details p {
    margin-bottom: 10px;
}

/* Dogs */
.dogs {
    padding: 60px 0;
    background-color: #f9f3e9;
}

.dogs h2 {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    color: #8b5e34;
    text-align: center;
    margin-bottom: 40px;
}

.dog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    box-sizing: border-box; /* Ensure padding/margins don’t break grid */
}

.dog-profile {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column; /* Ensure content stacks vertically within card */
}

.dog-profile img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block; /* Prevent inline spacing issues */
    max-width: 100%; /* Cap image width to container */
    -webkit-box-sizing: border-box; /* Safari-specific box-sizing */
    box-sizing: border-box;
}

.dog-details {
    padding: 20px;
    flex-grow: 1; /* Ensure text area takes available space */
}

.dog-details h3 {
    font-size: 1.6rem;
    color: #2a9d8f;
    margin-bottom: 10px;
}

.dog-details p {
    margin-bottom: 10px;
}

.dog-details a {
    color: #e76f51;
    text-decoration: none;
    font-weight: bold;
}

.dog-details a:hover {
    text-decoration: underline;
}

/* Safari-specific fix for grid */
@supports (-webkit-overflow-scrolling: touch) {
    .dog-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}
@media screen and (-webkit-min-device-pixel-ratio: 0) and (min-width: 769px) {
    .dog-grid {
        grid-template-columns: repeat(2, 1fr); /* Force 2 columns minimum */
    }
}

/* About */
.about {
    padding: 60px 0;
    background-color: #fff;
}

.about h2 {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    color: #8b5e34;
    text-align: center;
    margin-bottom: 40px;
}

.about-intro, .about-story, .about-values {
    margin-bottom: 40px;
}

.about h3 {
    font-size: 1.8rem;
    color: #2a9d8f;
    margin-bottom: 15px;
}

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

.team-member {
    text-align: center;
}

.team-member img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
}

.team-details h4 {
    font-size: 1.4rem;
    color: #2a9d8f;
    margin: 10px 0;
}

/* Contact */
.contact {
    padding: 60px 0;
    background-color: #f9f3e9;
}

.contact h2 {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    color: #8b5e34;
    text-align: center;
    margin-bottom: 40px;
}

form {
    max-width: 600px;
    margin: 0 auto 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.contact-hours {
    text-align: center;
}

.contact-hours h4 {
    font-size: 1.4rem;
    color: #2a9d8f;
    margin-bottom: 10px;
}

/* Footer */
.footer {
    background-color: #8b5e34;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.footer h4 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.footer a {
    color: #f4a261;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #f4a261;
    padding-top: 20px;
}

/* Blog */
.blog {
    padding: 60px 0;
    background-color: #fff;
}

.blog h2 {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    color: #8b5e34;
    text-align: center;
    margin-bottom: 40px;
}

.blog-post {
    max-width: 800px;
    margin: 0 auto 40px;
    background-color: #f9f3e9;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.blog-post img {
    width: 100%;
    height: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    display: block;
}

.blog-post h3 {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    color: #2a9d8f;
    margin-bottom: 10px;
}

.blog-post p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.blog-post p.date {
    font-style: italic;
    color: #8b5e34;
    font-size: 1rem;
    margin-bottom: 20px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.blog-entry {
    background-color: #f9f3e9;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.blog-entry img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-details {
    padding: 20px;
}

.blog-details h3 {
    font-size: 1.6rem;
    color: #2a9d8f;
    margin-bottom: 10px;
}

.blog-details p {
    margin-bottom: 15px;
}

.adsense-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
    background-color: #f9f3e9;
    border-radius: 10px;
}

/* Social Space */
.social-space {
    padding: 60px 0;
    background-color: #f9f3e9;
}

.profile-header {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.profile-pic {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-right: 20px;
    object-fit: cover;
}

.profile-info h1 {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    color: #8b5e34;
    margin-bottom: 10px;
}

.profile-info p {
    font-size: 1.2rem;
    color: #3a2f1f;
}

.upload-form {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.upload-form form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
}

.upload-form input[type="file"],
.upload-form input[type="text"] {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    flex: 1;
}

.upload-form input[type="text"] {
    flex: 2;
}

.upload-form button {
    margin-left: auto;
}

.login-prompt {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.2rem;
}

.login-prompt a {
    color: #e76f51;
    text-decoration: none;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.filters {
    text-align: center;
    margin-bottom: 40px;
}

.filters h3 {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    color: #2a9d8f;
    margin-bottom: 20px;
}

.filters a {
    margin: 0 10px;
}

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

.post {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.post img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    cursor: pointer;
}

.post-details {
    padding: 15px;
}

.post-details p {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.error {
    color: #e76f51;
    text-align: center;
    margin-bottom: 20px;
}

/* Lightbox */
#lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
}

/* Article */
.article {
    padding: 60px 0;
    background-color: #fff;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    background-color: #f9f3e9;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.article-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.article-content h1 {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    color: #8b5e34;
    margin-bottom: 15px;
}

.date {
    font-style: italic;
    color: #2a9d8f;
    margin-bottom: 20px;
}

.article-content h2 {
    font-family: 'Georgia', serif;
    font-size: 1.8rem;
    color: #2a9d8f;
    margin: 30px 0 15px;
}

.article-content p {
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.article-content strong {
    color: #e76f51;
}

.adsense-in-article {
    margin: 30px 0;
    text-align: center;
}

.adsense-container {
    max-width: 600px;
    margin: 40px auto 0;
    padding: 20px;
    background-color: #f9f3e9;
    border-radius: 10px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        text-align: center;
    }

    .nav ul {
        flex-direction: column;
        margin: 20px 0;
    }

    .nav ul li {
        margin: 10px 0;
    }

    .hero {
        padding: 60px 0;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1.2rem;
    }

    .blog-post img {
        height: 250px;
        max-height: 250px;
    }
}