/* The Ranchers Website - Country-Life Theme */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;600;700&family=Nunito:wght@400;500;600;700&display=swap');

:root {
    /* The Ranchers Country-Life Color Scheme */
    --primary-color: #1a3c0a;        /* Forest green */
    --secondary-color: #3d5c2e;      /* Sage green */
    --accent-color: #7cb342;         /* Grass green */
    --accent-glow: #8bc34a;          /* Light grass */
    --light-accent: #9ccc65;         /* Pale green */
    --dark-accent: #1b2e0f;          /* Dark forest */
    --bg-color: #faf8f5;             /* Warm cream background */
    --bg-secondary: #f5f0e8;         /* Soft cream */
    --text-color: #2c2416;           /* Dark brown text */
    --text-light: #4a4035;           /* Lighter brown */
    --menu-bg: rgba(250, 248, 245, 0.98);
    --border-color: rgba(124, 179, 66, 0.4);
    --shadow-color: rgba(26, 60, 10, 0.15);
    --shadow-glow: rgba(124, 179, 66, 0.25);
    --gradient-primary: linear-gradient(135deg, #1a3c0a 0%, #3d5c2e 50%, #558b2f 100%);
    --gradient-secondary: linear-gradient(135deg, #7cb342 0%, #8bc34a 100%);
    --gradient-dark: linear-gradient(135deg, #1b2e0f 0%, #1a3c0a 100%);
    --gradient-accent: linear-gradient(135deg, #8bc34a 0%, #7cb342 50%, #689f38 100%);
}

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

body {
    font-family: 'Nunito', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background: var(--bg-color);
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(124, 179, 66, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 195, 74, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-color) 0%, var(--bg-secondary) 100%);
    background-attachment: fixed;
    min-height: 100vh;
}

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

/* Header Styles */
header {
    background: linear-gradient(180deg, #1a3c0a 0%, #2d5016 100%);
    backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 2px solid rgba(124, 179, 66, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

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

.logo-text {
    font-family: 'Merriweather', serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

nav ul li a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.25s ease;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    position: relative;
}

nav ul li a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--light-accent);
    transform: translateX(-50%);
    transition: width 0.25s ease;
}

nav ul li a:hover {
    color: #fff;
    background: rgba(124, 179, 66, 0.35);
}

nav ul li a:hover::before {
    width: 70%;
}

nav ul li a.active {
    color: #fff;
    background: rgba(124, 179, 66, 0.4);
}

nav ul li a.active::before {
    width: 70%;
}

/* Main Content */
main {
    margin-top: 80px;
}

section {
    padding: 4rem 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
    margin-bottom: 1rem;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

h2 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

h3 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--secondary-color);
}

p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background: var(--gradient-secondary);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-glow);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-glow);
    background: linear-gradient(135deg, #8bc34a 0%, #7cb342 100%);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    box-shadow: none;
}

.btn-secondary:hover {
    background: rgba(124, 179, 66, 0.15);
    border-color: var(--accent-glow);
    color: var(--accent-glow);
}

/* Cards */
.card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px var(--shadow-color);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

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

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px var(--shadow-color);
    border-color: var(--accent-color);
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
}

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

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

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Footer */
footer {
    background: var(--gradient-dark);
    color: #e8e4df;
    padding: 4rem 0 1.5rem;
    margin-top: 4rem;
    border-top: 2px solid rgba(124, 179, 66, 0.3);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-accent);
}

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

.footer-logo img {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.footer-logo .logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.footer-logo .logo-text {
    font-size: 1.2rem;
    letter-spacing: 2px;
    color: #fff;
}

.footer-logo p {
    color: rgba(232, 228, 223, 0.9);
}

.footer-links h3,
.footer-links .footer-heading {
    color: var(--light-accent);
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-family: 'Merriweather', serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.footer-links ul li {
    margin-bottom: 0.6rem;
}

.footer-links ul li a {
    color: rgba(232, 228, 223, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.2rem 0;
}

.footer-links ul li a:hover {
    color: var(--light-accent);
    transform: translateX(5px);
}

.footer-bottom {
    border-top: 1px solid rgba(124, 179, 66, 0.3);
    padding-top: 1.5rem;
    text-align: center;
    color: rgba(232, 228, 223, 0.8);
}

/* Dropdown Menu Styles */
nav ul li.dropdown {
    position: relative;
}

nav ul li.dropdown > a::after {
    content: ' ▾';
    font-size: 0.65rem;
    margin-left: 0.25rem;
    opacity: 0.9;
    transition: transform 0.25s ease;
}

nav ul li.dropdown:hover > a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    border: 2px solid rgba(124, 179, 66, 0.4);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(0, 0, 0, 0.05);
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    z-index: 1001;
}

nav ul li.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    display: block;
    width: 100%;
    margin: 0;
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.25rem;
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    border-left: 4px solid transparent;
    transition: all 0.2s ease;
}

.dropdown-menu li a:hover {
    background: rgba(124, 179, 66, 0.12);
    border-left-color: var(--accent-color);
    color: var(--primary-color);
    padding-left: 1.5rem;
}

.dropdown-menu li a.active {
    background: rgba(124, 179, 66, 0.18);
    border-left-color: var(--accent-color);
    color: var(--primary-color);
    font-weight: 600;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: #fff;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 6px;
    flex-direction: column;
    gap: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: #fff;
    transition: all 0.3s ease;
}

.mobile-menu {
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--gradient-dark);
    backdrop-filter: blur(20px);
    z-index: 2000;
    transition: right 0.3s ease;
    border-left: 2px solid rgba(124, 179, 66, 0.3);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.2);
    padding: 4rem 2rem 2rem;
    overflow-y: auto;
    visibility: hidden;
}

.mobile-menu.active {
    right: 0;
    visibility: visible;
}

.mobile-menu .close-menu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: transparent;
    border: 2px solid var(--light-accent);
    color: var(--light-accent);
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.mobile-menu .close-menu:hover {
    background: rgba(124, 179, 66, 0.2);
}

.mobile-menu ul {
    list-style: none;
    padding: 0;
}

.mobile-menu ul li {
    margin-bottom: 1rem;
}

.mobile-menu ul li a {
    color: #e8e4df;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 0.8rem 1rem;
    display: block;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.mobile-menu ul li a:hover,
.mobile-menu ul li a.active {
    background: rgba(124, 179, 66, 0.15);
    border-left-color: var(--accent-color);
    color: var(--light-accent);
    transform: translateX(5px);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-accent);
    border-radius: 6px;
    border: 2px solid var(--bg-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-glow);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header {
        padding: 0;
    }
    
    nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    nav > ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .logo {
        gap: 0.5rem;
    }
    
    .logo img {
        height: 40px;
    }
    
    .logo-text {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }
    
    .footer-logo .logo img {
        height: 40px;
    }
    
    .footer-logo .logo-text {
        font-size: 1rem;
        letter-spacing: 1.5px;
    }
    
    .footer-logo p {
        font-size: 0.9rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    nav ul li a {
        font-size: 0.95rem;
        padding: 0.5rem 1rem;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 35px;
    }
    
    .logo-text {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }
    
    .footer-logo .logo img {
        height: 35px;
    }
    
    .footer-logo .logo-text {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }
    
    .footer-logo p {
        font-size: 0.85rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
    
    nav ul li a {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .container {
        padding: 0 10px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.6s ease forwards;
}

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

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    animation: slideInLeft 0.6s ease forwards;
}

@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    animation: slideInRight 0.6s ease forwards;
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--accent-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles for accessibility */
button:focus,
a:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Hero sections with dark image overlays - light text for contrast */
.hero, .news-hero, .guides-hero, .media-hero, .wiki-hero {
    color: #fff !important;
}
.hero h1, .hero h2, .hero .subtitle,
.news-hero h1, .guides-hero h1, .media-hero h1, .wiki-hero h1,
.news-hero p, .guides-hero p, .media-hero p, .wiki-hero p {
    color: #fff !important;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}
.hero .subtitle, .news-hero p, .guides-hero p, .media-hero p, .wiki-hero p {
    color: rgba(255,255,255,0.95) !important;
}
.wiki-hero .breadcrumb { color: rgba(255,255,255,0.9) !important; }
.wiki-hero .breadcrumb a { color: var(--light-accent) !important; }

/* Dark background sections - use light text (神女色/深色背景) */
.wiki-content,
.wiki-section,
.wiki-card,
.news-content .news-item,
.news-content .news-item-header,
.news-content .news-item-content,
.guide-section,
.guide-section-header,
.guide-section-body,
.featured-news .featured-item,
.featured-news .featured-content,
.media-content .media-item,
.media-content .media-info,
.video-section .video-item,
.wallpaper-section .wallpaper-item,
.introduction,
.features,
.game-info,
.feature-card,
.screenshots,
.faq {
    color: #e8e8e0;
}
.wiki-section h2,
.wiki-section h3,
.wiki-section p,
.wiki-section li,
.wiki-section .caption,
.vehicle-item,
.vehicle-item h3,
.vehicle-item p,
.wiki-card h3,
.wiki-card p,
.news-item .news-title,
.news-item .news-date,
.news-item .news-excerpt,
.guide-section-header h2,
.guide-section-body h3,
.guide-section-body h4,
.guide-section-body p,
.guide-section-body li,
.guide-section-body table th,
.guide-section-body table td,
.guide-section-body code,
.featured-title,
.featured-excerpt,
.media-title,
.media-description,
.video-item h3,
.video-item p,
.wallpaper-title,
.wallpaper-resolution,
.game-info h3,
.game-info h4,
.game-info p,
.feature-card h3,
.feature-card p,
.news-content h2,
.media-content h2,
.video-section h2,
.wallpaper-section h2,
.featured-news h2,
.screenshots h2,
.introduction h2,
.features h2,
.faq-question,
.faq-answer {
    color: #e8e8e0 !important;
}
.wiki-section h2 { border-bottom-color: rgba(156, 204, 101, 0.6); }
.wiki-card .arrow,
.news-item .news-title a,
.featured-content a,
.media-content a {
    color: #9ccc65 !important;
}
/* Guide section links - same light style as wiki links */
.guide-section-body a {
    color: #e8e8e0 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.guide-section-body a:hover {
    color: #fff !important;
}
.wiki-content .text-center,
.wiki-content p.text-center {
    color: rgba(232, 232, 224, 0.95) !important;
}
/* Wiki/external links in dark sections - light color with underline */
.wiki-content a {
    color: #e8e8e0 !important;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.wiki-content a:hover {
    color: #fff !important;
}

/* Print styles */
@media print {
    header,
    footer,
    .btn {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
