/* ==========================================================================
   Farm Page Styles - Complete CSS
   ========================================================================== */

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

body {
    font-family: 'Kanit', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Hero Section */
.farm-hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #2E7D32 0%, #388E3C 25%, #4CAF50 50%, #66BB6A 75%, #81C784 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.farm-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.farm-hero .container {
    position: relative;
    z-index: 2;
}

.farm-hero-img {
    max-height: 450px;
    width: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    transition: all 0.5s ease;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.farm-hero-img:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 35px 70px rgba(0, 0, 0, 0.4);
}

/* Deer Badge */
.deer-badge {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.9), rgba(255, 152, 0, 0.9));
    padding: 12px 25px;
    border-radius: 30px;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Typography */
.farm-hero h1 {
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.farm-hero .text-warning {
    color: #FFC107 !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.farm-hero p {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

/* Buttons */
.btn.enhanced {
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    transition: all 0.4s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

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

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

.btn-warning.enhanced {
    background: linear-gradient(135deg, #FFC107, #FF8F00);
    border-color: #FFC107;
    color: #212529;
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}

.btn-warning.enhanced:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 193, 7, 0.4);
    background: linear-gradient(135deg, #FF8F00, #F57C00);
    color: #fff;
}

.btn-outline-light.enhanced {
    border-color: rgba(255, 255, 255, 0.8);
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.btn-outline-light.enhanced:hover {
    background: rgba(255, 255, 255, 0.95);
    color: #2E7D32;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3);
}

/* Farm Info Section */
.farm-info-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.farm-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.farm-img-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.farm-img-container img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.farm-img-container:hover img {
    transform: scale(1.05);
}

.farm-badge {
    position: absolute;
    top: 25px;
    left: 25px;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.95), rgba(76, 175, 80, 0.95));
    color: white;
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.farm-content {
    padding: 20px 0;
}

.farm-content h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: #2E7D32;
    line-height: 1.3;
}

.farm-content .text-primary {
    color: #4CAF50 !important;
}

.farm-content p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

/* Farm Highlights */
.farm-highlights {
    margin-top: 2rem;
}

.farm-highlights .btn-sm-square {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.farm-highlights .d-flex {
    padding: 15px 0;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.farm-highlights .d-flex:hover {
    background: rgba(76, 175, 80, 0.1);
    transform: translateX(10px);
}

.farm-highlights span {
    font-weight: 600;
    color: #2E7D32;
    font-size: 1rem;
}

/* Farm Details Section */
.farm-details-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #f1f8e9 0%, #e8f5e8 100%);
}

.farm-details-section .deer-badge {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    color: white;
}

.farm-details-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #2E7D32;
    margin-bottom: 1rem;
}

.farm-details-section .text-primary {
    color: #4CAF50 !important;
}

/* Detail Cards */
.detail-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 40px 25px;
    border-radius: 20px;
    text-align: center;
    height: 100%;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 1px solid rgba(76, 175, 80, 0.1);
    position: relative;
    overflow: hidden;
}

.detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4CAF50, #2E7D32, #66BB6A);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

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

.detail-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f1f8e9 100%);
}

.detail-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2.2rem;
    box-shadow: 0 10px 25px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.detail-icon::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: linear-gradient(45deg, #4CAF50, #2E7D32, #66BB6A, #4CAF50);
    border-radius: 50%;
    z-index: -1;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.detail-card:hover .detail-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 35px rgba(76, 175, 80, 0.4);
}

.detail-card h5 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2E7D32;
    line-height: 1.3;
}

.detail-card p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 50%, #fff3e0 100%);
}

.contact-section .deer-badge {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
}

.contact-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1976D2;
    margin-bottom: 1rem;
}

.contact-section .text-primary {
    color: #2196F3 !important;
}

.contact-items {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px 30px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(33, 150, 243, 0.1);
    position: relative;
    overflow: hidden;
}

.contact-items::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2196F3, #1976D2, #42A5F5);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.contact-items:hover::before {
    transform: scaleX(1);
}

.contact-items:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

.contact-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2.2rem;
    box-shadow: 0 10px 25px rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease;
}

.contact-items:hover .contact-icon {
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 0 15px 35px rgba(33, 150, 243, 0.4);
}

.contact-items h5 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1976D2;
}

.contact-items p {
    margin-bottom: 10px;
}

.contact-items a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.contact-items a:hover {
    color: #1976D2;
    text-decoration: underline;
}

.contact-items .text-muted {
    color: #666 !important;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

.smooth-scroll {
    scroll-behavior: smooth;
}

/* Animation Classes */
.show-on-load {
    animation: fadeInUp 1.2s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

/* WOW Animation Support */
.wow {
    visibility: hidden;
}

.wow.animate__animated {
    visibility: visible;
}

/* Loading Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.detail-card:nth-child(even):hover {
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .farm-content h2 {
        font-size: 2.5rem;
    }

    .detail-card {
        padding: 35px 20px;
    }
}

@media (max-width: 992px) {
    .farm-hero {
        min-height: 90vh;
    }

    .farm-hero h1 {
        font-size: 2.5rem;
    }

    .farm-content h2 {
        font-size: 2.2rem;
    }

    .farm-info-section,
    .farm-details-section,
    .contact-section {
        padding: 80px 0;
    }
}

@media (max-width: 768px) {
    .farm-hero {
        min-height: 80vh;
        padding: 80px 0;
    }

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

    .farm-hero .display-3 {
        font-size: 2rem !important;
    }

    .farm-content h2 {
        font-size: 1.8rem;
    }

    .detail-card {
        padding: 30px 15px;
        margin-bottom: 30px;
    }

    .detail-icon,
    .contact-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .farm-info-section,
    .farm-details-section,
    .contact-section {
        padding: 60px 0;
    }

    .btn.enhanced {
        padding: 12px 25px;
        font-size: 0.9rem;
    }

    .deer-badge {
        padding: 10px 20px;
        font-size: 14px;
    }

    .farm-highlights .d-flex:hover {
        transform: none;
    }

    .farm-hero-img {
        max-height: 300px;
        margin-top: 30px;
    }
}

@media (max-width: 576px) {
    .farm-hero h1 {
        font-size: 1.6rem;
    }

    .farm-hero .display-3 {
        font-size: 1.6rem !important;
    }

    .farm-content h2 {
        font-size: 1.5rem;
    }

    .farm-details-section h2,
    .contact-section h2 {
        font-size: 1.8rem;
    }

    .detail-card,
    .contact-items {
        padding: 25px 15px;
    }

    .detail-icon,
    .contact-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .btn.enhanced {
        padding: 10px 20px;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }

    .farm-info-section,
    .farm-details-section,
    .contact-section {
        padding: 50px 0;
    }
}

/* Print Styles */
@media print {

    .farm-hero,
    .btn,
    .contact-section {
        display: none !important;
    }

    .farm-info-section,
    .farm-details-section {
        padding: 20px 0;
        background: white !important;
    }

    .detail-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .farm-hero {
        background: #000;
    }

    .detail-card,
    .contact-items {
        border: 2px solid #000;
    }

    .detail-icon,
    .contact-icon {
        background: #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .detail-card:hover,
    .contact-items:hover,
    .btn.enhanced:hover {
        transform: none;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.contact-items a:focus {
    outline: 3px solid #4CAF50;
    outline-offset: 2px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
}

/* ========================================= */
/* CONTACT SECTION - แก้ไขปัญหาการแสดงผล */
/* ========================================= */

.contact-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 50%, #fff3e0 100%);
    position: relative;
}

.contact-section .deer-badge {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: white;
    display: inline-block;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1976D2;
    margin-bottom: 1rem;
}

.contact-section .text-primary {
    color: #2196F3 !important;
}

/* Contact Item Cards */
.contact-items {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 50px 30px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    border: 1px solid rgba(33, 150, 243, 0.1);
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 250px;
}

.contact-items::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2196F3, #1976D2, #42A5F5);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.contact-items:hover::before {
    transform: scaleX(1);
}

.contact-items:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #e3f2fd 100%);
}

/* Contact Icons */
.contact-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #2196F3, #1976D2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2.2rem;
    box-shadow: 0 10px 25px rgba(33, 150, 243, 0.3);
    transition: all 0.3s ease;
}

.contact-items:hover .contact-icon {
    transform: scale(1.1) rotate(-10deg);
    box-shadow: 0 15px 35px rgba(33, 150, 243, 0.4);
}

.contact-items h5 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1976D2;
}

.contact-items p {
    margin-bottom: 10px;
    font-size: 1rem;
    line-height: 1.6;
}

.contact-items a {
    color: #2196F3;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.contact-items a:hover {
    color: #1976D2;
    text-decoration: underline;
}

.contact-items .text-muted {
    color: #666 !important;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-top: 10px;
}

/* Responsive Contact Section */
@media (max-width: 768px) {
    .contact-section {
        padding: 60px 0;
    }

    .contact-items {
        padding: 30px 20px;
        min-height: 200px;
        margin-bottom: 30px;
    }

    .contact-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }

    .contact-section h2 {
        font-size: 1.8rem;
    }
}