:root {
    --primary-bg: #4f556d;
    --accent-gold: #d4af37;
    --text-light: #ffffff;
    --text-dark: #333333;
    --overlay-dark: rgba(0, 0, 0, 0.6);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Reduce layout shifts */
.logo img {
    width: 150px;
    height: 150px;
    object-fit: contain;
}

/* Optimize animations for performance */
* {
    will-change: auto;
}

.stable-card:hover,
.btn:hover,
.gallery-item:hover {
    will-change: transform;
}

/* Improve font loading */
body {
    font-display: swap;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 140px;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

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

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

.section-title {
    font-size: 2.5rem;
    color: var(--accent-gold);
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(79, 85, 109, 0.95);
    box-shadow: var(--shadow);
}

.navbar {
    padding: 1rem 0;
    min-height: 80px;
    display: flex;
    align-items: center;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 150px;
    width: auto;
    display: block;
}

.logo {
    min-height: 150px;
    display: flex;
    align-items: center;
}

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

/* Fix for body scroll during menu open */
body.menu-open {
    overflow: hidden;
}

/* Horse-themed decorative elements */
.horseshoe-decoration {
    position: relative;
}


@keyframes gentle-bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

/* Subtle fade-in animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.nav-link {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    position: relative;
    transition: all 0.3s ease;
    font-family: 'Playfair Display', serif;
}

.nav-link:hover {
    color: var(--accent-gold);
    background: rgba(184, 134, 11, 0.1);
    transform: translateY(-2px);
}

.nav-link.active {
    color: var(--accent-gold);
    background: rgba(184, 134, 11, 0.15);
    border-bottom: 2px solid var(--accent-gold);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 3px 0;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

.hero {
    height: 100vh;
    background-image: url('./img/Stable1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: var(--primary-bg);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(79, 85, 109, 0.9), rgba(79, 85, 109, 0.7));
}

.hero-content {
    position: relative;
    text-align: center;
    color: var(--text-light);
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content * {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--accent-gold);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 1s ease 0.6s;
    animation-fill-mode: both;
    position: relative;
    z-index: 1;
}

.btn {
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent-gold);
    color: var(--text-dark);
}

.btn-primary:hover {
    background: #b8941f;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 2px solid var(--text-light);
}

.btn-secondary:hover {
    background: var(--text-light);
    color: var(--primary-bg);
}

.about {
    padding: 160px 0 80px 0;
    background: #f8f9fa;
    margin-top: 0;
    position: relative;
    z-index: 10;
}

.about-content {
    display: grid;
    gap: 3rem;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

.about-text p {
    margin-bottom: 1.5rem;
}

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

.feature {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
}

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

.feature h3 {
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.internal-stables,
.external-stables {
    padding: 80px 0;
    background: var(--primary-bg);
}

.internal-stables .section-title,
.external-stables .section-title {
    color: var(--accent-gold);
}

.internal-stables .section-subtitle,
.external-stables .section-subtitle {
    color: #ccc;
}

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

.external-stables .stable-grid {
    grid-template-columns: repeat(3, 1fr);
}

.stable-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    position: relative;
}

.stable-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gold);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stable-card:hover::before {
    transform: scaleX(1);
}

.stable-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    border-color: var(--accent-gold);
}

.stable-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    background-color: #f0f0f0;
}

.stable-content {
    padding: 1.5rem;
}

.stable-content h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.stable-content p {
    margin-bottom: 1rem;
    color: #666;
    line-height: 1.6;
}

.stable-content ul {
    list-style: none;
}

.stable-content ul li {
    padding: 0.25rem 0;
    color: #555;
    position: relative;
    padding-left: 20px;
}

.stable-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent-gold);
    font-weight: bold;
}

.gallery {
    padding: 80px 0;
    background: #f8f9fa;
}

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

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    height: 300px;
}

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

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.contact {
    padding: 80px 0;
    background: var(--primary-bg);
}

.contact .section-title {
    color: var(--accent-gold);
}

.contact .section-subtitle {
    color: #ccc;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
}

.form-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    display: none;
}

.form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

.form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.contact-info {
    color: white;
}

.info-item {
    margin-bottom: 2rem;
}

.info-item h3,
.info-item h4 {
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.info-item p {
    margin-bottom: 0.5rem;
    color: #ccc;
}

.footer {
    background: #2c3e50;
    color: white;
    padding: 3rem 0 2rem;
}

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

.footer-section h3,
.footer-section h4 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--accent-gold);
}


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

@media (max-width: 1024px) {
    .stable-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .external-stables .stable-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        z-index: 1001;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--primary-bg);
        width: 100%;
        height: calc(100vh - 80px);
        text-align: center;
        transition: left 0.4s ease;
        padding: 2rem 0;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        z-index: 1000;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin: 1rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 1rem;
    }
    
    .section-title {
        font-size: 2rem;
        margin-top: 1rem;
    }
    
    .about, .internal-stables, .external-stables, .gallery, .contact {
        scroll-margin-top: 120px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
    
    .about-features {
        grid-template-columns: 1fr;
    }
    
    .stable-grid {
        grid-template-columns: 1fr;
    }
    
    .external-stables .stable-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
    }
    
    .btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}