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

:root {
    --tan: #D4B896;
    --rust: #A0522D;
    --dark-brown: #2C1810;
    --cream: #F5F0E8;
    --gold: #C9A961;
}

body {
    font-family: 'Lato', sans-serif;
    color: var(--dark-brown);
    background-color: var(--cream);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--tan) 0%, var(--cream) 100%);
    padding: 4rem 2rem;
    text-align: center;
    border-bottom: 3px solid var(--rust);
}

.logo {
    max-width: 300px;
    margin: 0 auto 2rem;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.1));
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--dark-brown);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--rust);
    max-width: 700px;
    margin: 0 auto;
    font-weight: 300;
}

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

/* Section Styling */
section {
    padding: 4rem 0;
}

section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-brown);
    position: relative;
    padding-bottom: 1rem;
}

section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--rust);
}

/* About Section */
.about {
    background-color: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

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

.feature {
    background: var(--cream);
    padding: 2rem;
    border-radius: 8px;
    border: 2px solid var(--tan);
    transition: transform 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    border-color: var(--rust);
}

.feature h3 {
    color: var(--rust);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Horses Section */
.horses {
    background: linear-gradient(to bottom, var(--cream), var(--tan));
}

.association-note {
    text-align: center;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--rust);
    margin-bottom: 2rem;
    margin-top: -2rem;
}

.association-note a {
    color: var(--rust);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.association-note a:hover {
    color: var(--dark-brown);
}

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

.horse-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.horse-card .horse-image:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    overflow: hidden;
}

.horse-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.horse-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--tan), var(--rust));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    position: relative;
}

.horse-image:not(.photo-stack) {
    overflow: hidden;
}

.horse-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.sold-overlay {
    position: absolute;
    top: 25px;
    right: -65px;
    background-color: rgba(220, 38, 38, 0.95);
    color: white;
    padding: 0.75rem 6rem;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 2px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transform: rotate(40deg);
    pointer-events: none;
    z-index: 10;
}

.horse-info {
    padding: 1.5rem;
}

.horse-info h3 {
    color: var(--dark-brown);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.horse-details {
    color: var(--rust);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.horse-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--rust);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn:hover {
    background: var(--dark-brown);
}

/* Contact Section */
.contact {
    background: var(--dark-brown);
    color: var(--cream);
    text-align: center;
}

.contact h2 {
    color: var(--cream);
}

.contact h2::after {
    background: var(--gold);
}

.contact-content {
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.contact-email {
    font-size: 1.5rem;
    color: var(--gold);
    transition: color 0.3s ease;
}

.contact-email.hidden {
    opacity: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
}

.contact-email.revealed {
    opacity: 1;
    height: auto;
    animation: fadeIn 0.5s ease-in;
    margin-top: 1rem;
}

.contact-email a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-email a:hover {
    color: var(--tan);
}

.contact-phone {
    font-size: 1.5rem;
    color: var(--gold);
    margin-top: 1.5rem;
    transition: color 0.3s ease;
}

.contact-phone.hidden {
    opacity: 0;
    height: 0;
    overflow: hidden;
    margin: 0;
}

.contact-phone.revealed {
    opacity: 1;
    height: auto;
    animation: fadeIn 0.5s ease-in;
}

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

.contact-phone a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-phone a:hover {
    color: var(--tan);
}

.location {
    margin-top: 1.5rem;
    font-size: 1.1rem;
    color: var(--tan);
}

/* Footer */
footer {
    background: #1a0f0a;
    color: var(--tan);
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
}

/* Photo Stack Effect */
.photo-stack {
    cursor: pointer;
    overflow: visible !important;
}

.photo-stack .stack-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
}

.photo-stack .stack-back {
    transform: translate(5px, 5px) rotate(2deg);
    z-index: 1;
    filter: brightness(0.85);
}

.photo-stack .stack-front {
    transform: translate(-3px, -3px);
    z-index: 2;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.25);
}

.photo-stack:hover .stack-back {
    transform: translate(8px, 8px) rotate(3deg);
}

.photo-stack:hover .stack-front {
    transform: translate(-5px, -5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

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

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Slide animations */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

#lightbox-image.slide-in-right {
    animation: slideInFromRight 0.4s ease-out forwards;
}

#lightbox-image.slide-in-left {
    animation: slideInFromLeft 0.4s ease-out forwards;
}

#lightbox-image.slide-out-left {
    animation: slideOutToLeft 0.4s ease-out forwards;
}

#lightbox-image.slide-out-right {
    animation: slideOutToRight 0.4s ease-out forwards;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 3rem;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10001;
    padding: 0;
    width: 50px;
    height: 50px;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: var(--rust);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 1rem 1.5rem;
    transition: background 0.3s ease, transform 0.2s ease;
    z-index: 10001;
    line-height: 1;
    border-radius: 4px;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-nav.hidden {
    display: none;
}

/* Lightbox Dots */
.lightbox-dots {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: center;
}

.lightbox-dots.hidden {
    display: none;
}

.lightbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.lightbox-dot.active {
    background: var(--gold);
    transform: scale(1.3);
}

.lightbox-dot:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section h2 {
        font-size: 2rem;
    }

    .horses-grid {
        grid-template-columns: 1fr;
    }

    .lightbox-nav {
        font-size: 2.5rem;
        padding: 0.5rem 1rem;
    }

    .lightbox-close {
        font-size: 2rem;
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .photo-stack .stack-back {
        transform: translate(3px, 3px) rotate(2deg);
    }

    .photo-stack:hover .stack-back {
        transform: translate(5px, 5px) rotate(2deg);
    }
}
