:root {
    /* Color Palette - Elegant Farm Aesthetics */
    --primary: #1a3c34;    /* Deep Forest Green */
    --secondary: #c5a059;  /* Muted Gold */
    --text-dark: #222222;
    --text-light: #f4f4f4;
    --bg-light: #ffffff;
    --bg-soft: #f9f9f9;
    --bg-dark: #121212;
    --accent: #d4af37;
    
    /* Typography */
    --font-heading: "Bodoni Moda", serif;
    --font-subheading: "Noto Serif JP", serif;
    --font-body: "Outfit", sans-serif;
    
    /* Transitions */
    --transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

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

/* Header & Navigation */
#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
}

#header.scrolled {
    background: var(--primary);
    padding: 15px 0;
    border-bottom: 2px solid var(--secondary);
}

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

.logo {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 1.8rem;
    color: white;
    letter-spacing: 0.1em;
    white-space: nowrap;
}

.logo a, .logo a:visited, .logo a:active {
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: opacity 0.3s ease;
}

.logo a:hover {
    opacity: 0.8;
}

.logo .en-logo {
    display: inline-block;
    font-size: 1.2rem;
    font-family: var(--font-body);
    letter-spacing: 0.1em;
    font-weight: 300;
    opacity: 0.9;
}

.nav-desktop ul {
    display: flex;
    list-style: none;
    gap: 20px; /* Reduced gap from 30px */
}

.nav-desktop a {
    text-decoration: none;
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
    letter-spacing: 0.1em;
}

.nav-desktop a:hover {
    color: var(--secondary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background: white;
    transition: var(--transition);
}

/* Hero Section */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: white;
    text-align: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
    animation: kenBurns 20s linear infinite alternate;
}

@keyframes kenBurns {
    0% { transform: scale(1.1) translate(0, 0); }
    100% { transform: scale(1.3) translate(-2%, -2%); }
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5); /* Simple dark overlay, no gradient vignette */
}

.hero-title {
    font-family: var(--font-subheading);
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 0.2em;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-style: italic;
    opacity: 0.9;
    margin-bottom: 40px;
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.7rem;
    letter-spacing: 0.3em;
    color: white;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
}

.scroll-indicator:hover {
    color: var(--secondary);
}

.scroll-indicator::after {
    content: '';
    display: block;
    width: 1px;
    height: 60px;
    background: white;
    margin: 10px auto 0;
    animation: scrollLine 2s infinite ease-in-out;
}

@keyframes scrollLine {
    0% { height: 0; transform: translateY(0); opacity: 0; }
    50% { height: 60px; transform: translateY(0); opacity: 1; }
    100% { height: 0; transform: translateY(60px); opacity: 0; }
}

/* Section Styles */
.section {
    padding: 120px 0;
}

.section.dark {
    background-color: var(--primary);
    color: white;
}

.section.dark h2, .section.dark h3 {
    color: white;
}

.section.alt {
    background-color: #f8f9fa; /* Subtle gray background for separation */
    border-top: 1px solid #f0f0f0;
}


.section.dark span.telephone {
    color: white;
    text-decoration: none;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.sub-title {
    display: block;
    font-size: 0.8rem;
    color: var(--secondary);
    letter-spacing: 0.4em;
    margin-bottom: 15px;
    font-weight: 700;
}

h2 {
    font-family: var(--font-subheading);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.section-date {
    font-size: 0.8rem;
    font-weight: 400;
    color: #888;
    margin-left: 10px;
}

@media (max-width: 768px) {
    .section-date {
        display: block;
        margin-left: 0;
        margin-top: 5px;
    }
}

.wellmet-note {
    font-size: 0.85rem;
    color: #888;
    margin-top: 15px;
    font-family: var(--font-subheading);
}

/* Concept Section */
.concept-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.concept-text h3 {
    font-family: var(--font-subheading);
    font-size: 2rem;
    margin-bottom: 30px;
    line-height: 1.4;
}

.concept-image img {
    border-radius: 4px;
    border: 1px solid #eee;
}

/* History Section */
.history-content {
    max-width: 800px;
    margin: 0 auto;
}

.history-item {
    display: flex;
    gap: 40px;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2); /* Gold-tinted border */
}

.history-item .year {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--secondary);
    min-width: 80px;
}

/* Facility Grid */
.facility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.facility-card {
    background: var(--bg-soft);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.facility-card:hover {
    transform: translateY(-5px);
    border: 2px solid var(--secondary);
}

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

.card-content {
    padding: 25px;
}

.card-content h3 {
    font-family: var(--font-subheading);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
}

.facility-list {
    list-style: none;
    padding-left: 0;
}

.facility-list li {
    font-size: 0.9rem;
    margin-bottom: 8px;
    position: relative;
    padding-left: 20px;
}

.facility-list li::before {
    content: '•';
    color: var(--secondary);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Horse Grid (Representative) */
.horse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.horse-card {
    border: 1px solid rgba(255,255,255,0.2);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: block;
}

.horse-card::after {
    content: '→ VIEW ON netkeiba';
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    font-size: 0.7rem;
    color: var(--secondary);
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.horse-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: var(--secondary);
}

.horse-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.horse-year {
    display: block;
    font-size: 0.8rem;
    color: var(--secondary);
    font-family: var(--font-heading);
    margin-bottom: 10px;
    opacity: 0.8;
}

.horse-card h3 {
    font-family: var(--font-subheading);
    color: white;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.win-label {
    font-size: 0.95rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
}

.win-label::after {
    content: '';
    display: block;
    width: 30px;
    height: 1px;
    background: var(--secondary);
    margin: 15px auto 0;
}

/* Selling Section */
.selling-container {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

.year-label {
    font-family: var(--font-subheading);
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 4px solid var(--secondary);
}

.selling-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.selling-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 30px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    border-top: 3px solid transparent;
}

.selling-card:hover {
    border-color: var(--secondary);
    border-top-color: var(--secondary);
    background: #fcfcfc;
    transform: translateY(-5px);
}

.status-tag {
    display: inline-block;
    background: #d32f2f;
    color: #fff;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 700;
    margin-bottom: 15px;
    vertical-align: middle;
}

.horse-label {
    display: block;
    font-family: var(--font-subheading);
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 20px;
    font-weight: 700;
    position: relative;
}

.horse-label::after {
    content: '';
    display: block;
    width: 20px;
    height: 2px;
    background: var(--secondary);
    margin-top: 8px;
}

.horse-info p {
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: #555;
    display: flex;
    align-items: baseline;
}

.horse-info p span {
    font-weight: 700;
    color: #222;
    display: inline-block;
    width: 95px;
    flex-shrink: 0;
}

.update-badge {
    display: block;
    margin-top: 15px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #d32f2f;
    border-top: 1px dashed #eee;
    padding-top: 10px;
    text-align: right;
}

/* Representative Horse Section Archive Link */
.archive-link {
    text-align: center;
}

/* Buttons */
.btn-outline {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid var(--secondary);
    color: var(--secondary);
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    transition: var(--transition);
    background: transparent;
}

.btn-outline:hover {
    background: var(--secondary);
    color: white;
}

/* Visit Section */
.visit-box {
    background: #fff;
    padding: 80px 60px;
    border-radius: 4px;
    text-align: center;
    border: 1px solid #eee;
}

.visit-content h3, .memorial-content h3 {
    font-family: var(--font-subheading);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.warning-text {
    color: #c0392b;
    font-size: 1.2rem;
    margin: 20px 0;
    font-weight: 700;
}

.memorial-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding: 30px 0;
    flex-wrap: wrap;
}

.memorial-card {
    display: inline-block;
    padding: 15px 30px;
    border: 1px solid var(--primary);
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 0.1em;
    transition: var(--transition);
    background: transparent;
    min-width: 220px;
}

.memorial-card:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

.visit-link {
    margin-top: 30px;
}

.btn-large {
    padding: 20px 40px !important;
    font-size: 1.1rem !important;
    border: 3px solid var(--secondary) !important;
}

.btn-solid {
    display: inline-block;
    padding: 18px 40px;
    background: var(--primary);
    color: white;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    border: 2px solid var(--primary);
}

.btn-solid:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    transform: translateY(-3px);
}

/* Floating Animation Removed for a more grounded feel */

/* Service Section */
.service-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 60px;
    align-items: center;
    background: var(--bg-soft);
    padding: 40px;
    border-radius: 12px;
}

.service-image img {
    border-radius: 8px;
}

/* Profile & Access Section */
.profile-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.profile-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
}

.profile-table th, .profile-table td {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: left;
}

.profile-table th {
    width: 140px;
    font-family: var(--font-subheading);
    color: var(--secondary);
    font-weight: 700;
}

.profile-table td {
    color: white;
    line-height: 1.6;
}

.contact-box {
    margin-top: 40px;
}

.profile-map {
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.1);
}

.contact-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(197, 160, 89, 0.3); /* Subtle gold border */
    padding: 40px;
    border-radius: 12px;
    margin-top: 30px;
    transition: var(--transition);
}

.contact-card:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--secondary);
}

.contact-card p {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    margin-bottom: 30px;
    font-family: var(--font-subheading);
}

.btn-box {
    display: block;
    text-align: center;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

/* Footer */
#footer {
    padding: 60px 0;
    background: #0a0a0a;
    color: rgba(255,255,255,0.5);
    text-align: center;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-up.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .hero-title { font-size: 3.5rem; }
    .concept-layout, .service-layout { grid-template-columns: 1fr; }
    .concept-image { order: -1; }
}

@media (max-width: 768px) {
    .container { padding: 0 20px; }
    
    .nav-desktop {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--primary);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-desktop.active {
        right: 0;
    }
    
    .nav-desktop ul {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    
    .nav-desktop a {
        font-size: 1.5rem;
    }
    
    .menu-toggle {
        display: flex;
        z-index: 1001;
    }
    
    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

    .logo {
        font-size: 1.5rem;
        gap: 10px;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .logo .en-logo {
        font-size: 0.8rem;
    }

    .profile-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .profile-table th {
        width: 100px;
        font-size: 0.9rem;
    }

    .hero-title { font-size: 2.5rem; }
    .section { padding: 80px 0; }
}

/* --- Horse Detail Enhancements --- */
.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.horse-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px 30px;
    font-size: 1.15rem;
    color: #444;
    margin-bottom: 25px;
    letter-spacing: 0.05em;
    font-family: var(--font-subheading);
}

.horse-meta span {
    position: relative;
}

.horse-meta span:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -15px;
    color: #ccc;
    font-weight: 200;
}

.contact-info {
    margin-top: 30px;
    padding: 25px;
    background: #f9f9f9;
    border-radius: 0; /* Removed rounding for a flatter look */
    border-left: 4px solid var(--secondary);
    box-shadow: none !important;
}

.contact-info p {
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
}

.tel-link {
    display: block;
    font-size: 1.8rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 800;
    margin-top: 10px;
    font-family: 'Outfit', sans-serif;
}

.tel-link:hover {
    color: var(--secondary);
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Breeder Comments Timeline */
.comment-timeline {
    margin-top: 20px;
}

.comment-item {
    position: relative;
    padding-left: 30px;
    border-left: 2px solid var(--primary);
    margin-bottom: 40px;
}

.comment-item::before {
    content: '';
    position: absolute;
    left: -7px;
    top: 0;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
}

.comment-date {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.comment-text {
    font-size: 1.05rem;
    line-height: 1.8;
}

.hidden-comments {
    display: none;
}

.more-comments-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: #f7f7f7;
    border: 1px solid #eee;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
}

.more-comments-btn:hover {
    background: var(--primary);
    color: #fff;
}

@media (max-width: 768px) {
    .detail-grid {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    
    .content-left {
        order: 1;
    }
    
    .content-right {
        order: 2;
    }

    .horse-meta {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .horse-meta span::after {
        display: none !important;
    }

    .pdf-section, .pedigree-summary, .contact-info {
        margin-top: 20px !important;
    }

    .dam-sire {
        display: block;
        margin-left: 0;
        font-size: 1.2rem;
        margin-top: 5px;
    }
}

/* Common clearance for detail pages on all devices */
body[data-horse-id] main {
    margin-top: 100px !important;
}

body[data-horse-id] .back-nav {
    margin-top: 20px !important;
    margin-bottom: 30px !important;
}

/* News Section */
.news-section {
    padding: 20px 0;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.news-ticker {
    display: flex;
    align-items: center;
    gap: 30px;
}

.news-label {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--secondary);
    letter-spacing: 0.2em;
    padding: 5px 15px;
    border: 1px solid var(--secondary);
}

.news-list {
    list-style: none;
    flex: 1;
    margin: 0;
    padding: 0;
}

.news-list li {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
}

.news-date {
    font-family: var(--font-heading);
    color: #888;
    min-width: 90px;
}

.news-tag {
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 2px;
    font-weight: 700;
}

.news-title {
    color: var(--primary);
    font-weight: 500;
}

@media (max-width: 768px) {
    .news-ticker {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .news-list li {
        flex-wrap: wrap;
        gap: 5px;
    }
    .news-date {
        min-width: auto;
        font-size: 0.85rem;
    }
    .news-title {
        width: 100%;
        font-size: 0.9rem;
    }
}
