/* ========================================= */
/* HOME PAGE SPECIFIC STYLES */
/* ========================================= */

/* Font Fix for Hero Title */
.home-hero .display-3 {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.5px;
}

.home-hero h1 {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 700 !important;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.home-hero h1 small {
    font-family: 'Kanit', sans-serif !important;
    font-weight: 400 !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.home-hero .text-warning {
    font-weight: 800 !important;
    font-size: 6rem !important;
}

/* Additional font fixes */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Kanit', sans-serif !important;
}

p,
span,
a,
li {
    font-family: 'Kanit', sans-serif !important;
}

/* ========================================= */
/* HERO SECTION */
/* ========================================= */

.hero-header.home-hero.enhanced {
    background: linear-gradient(135deg, #8B4513 0%, #CD853F 50%, #6B4423 100%);
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-header.home-hero.enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(245, 213, 71, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(34, 139, 34, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(139, 69, 19, 0.05) 0%, transparent 70%),
        url('../img/hero-bg.jpg') repeat;
    opacity: 0.2;
    z-index: 1;
    animation: float 20s ease-in-out infinite;
}

.hero-header.home-hero.enhanced .container {
    position: relative;
    z-index: 2;
}

/* Deer Badge */
.deer-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--warning) 0%, #f39c12 100%);
    color: var(--dark);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(245, 213, 71, 0.4);
    font-family: 'Kanit', sans-serif !important;
}

/* Enhanced Buttons */
.btn.enhanced {
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    font-family: 'Kanit', sans-serif !important;
}

.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;
}

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

.btn.enhanced:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Hero Image Container */
.hero-img-container {
    position: relative;
}

.deer-hero-img {
    transition: transform 0.3s ease;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    max-height: 500px;
}

.deer-hero-img:hover {
    transform: scale(1.05) rotate(2deg);
}

/* Floating Elements */
.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    font-size: 2rem;
    animation: floatAnim 6s ease-in-out infinite;
    opacity: 0.7;
}

.floating-element:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    top: 80%;
    left: 20%;
    animation-delay: 4s;
}

/* Show on Load Animation */
.show-on-load {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s ease-out forwards;
}

.show-on-load:nth-child(1) {
    animation-delay: 0.1s;
}

.show-on-load:nth-child(2) {
    animation-delay: 0.3s;
}

.show-on-load:nth-child(3) {
    animation-delay: 0.5s;
}

.show-on-load:nth-child(4) {
    animation-delay: 0.7s;
}

/* ========================================= */
/* QUICK STATS SECTION */
/* ========================================= */

.quick-stats-section {
    background: var(--soft-cream);
    margin-top: -50px;
    position: relative;
    z-index: 3;
}

.stat-item {
    background: var(--white);
    padding: 30px 25px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.stat-item:hover,
.stat-item.hovered {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 69, 19, 0.05), transparent);
    transition: left 0.6s ease;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.stat-icon i {
    font-size: 1.8rem;
    color: white;
}

.stat-item:hover .stat-icon {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(139, 69, 19, 0.3);
}

.stat-content h3 {
    font-size: 3rem;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 5px;
    font-family: 'Kanit', sans-serif !important;
    display: inline-block;
}

.counter-suffix {
    font-size: 1.5rem;
    color: var(--primary);
    font-weight: 700;
    font-family: 'Kanit', sans-serif !important;
}

.stat-content p {
    color: #666;
    font-weight: 500;
    margin: 0;
    font-family: 'Kanit', sans-serif !important;
}

/* ========================================= */
/* FEATURES SECTION */
/* ========================================= */

.features-section {
    background: var(--light);
}

.feature-item {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.feature-item:hover,
.feature-item.hovered {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 69, 19, 0.03), transparent);
    transition: left 0.6s ease;
}

.feature-item:hover::before {
    left: 100%;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-item:hover .feature-icon {
    transform: scale(1.1);
    box-shadow: 0 15px 30px rgba(139, 69, 19, 0.3);
}

.feature-item h5 {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 20px;
    font-family: 'Kanit', sans-serif !important;
}

.feature-item p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-family: 'Kanit', sans-serif !important;
}

.feature-item .btn {
    border-radius: 25px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
    font-family: 'Kanit', sans-serif !important;
}

.feature-item .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* ========================================= */
/* ABOUT PROJECT SECTION */
/* ========================================= */

.about-project-section {
    background: var(--white);
}

.about-img-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.about-img-container img {
    transition: transform 0.3s ease;
    width: 100%;
}

.about-img-container:hover img {
    transform: scale(1.1);
}

.about-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, var(--warning) 0%, #f39c12 100%);
    color: var(--dark);
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 5px 15px rgba(245, 213, 71, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Kanit', sans-serif !important;
}

.about-content h2 {
    color: var(--dark);
    font-weight: 700;
    margin-bottom: 25px;
    font-family: 'Kanit', sans-serif !important;
}

.about-content p {
    color: #666;
    line-height: 1.8;
    font-size: 1.1rem;
    font-family: 'Kanit', sans-serif !important;
}

.project-highlights {
    margin: 30px 0;
}

.project-highlights span {
    color: var(--dark);
    font-weight: 500;
    font-family: 'Kanit', sans-serif !important;
}

.btn-sm-square {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ========================================= */
/* CTA SECTION */
/* ========================================= */

.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 30% 70%, rgba(245, 213, 71, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 70% 30%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    z-index: 1;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    font-weight: 700;
    font-family: 'Kanit', sans-serif !important;
}

.cta-section p {
    font-family: 'Kanit', sans-serif !important;
}

.cta-section .btn {
    padding: 15px 30px;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-family: 'Kanit', sans-serif !important;
}

.cta-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* ========================================= */
/* ANIMATIONS */
/* ========================================= */

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

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

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes floatAnim {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    25% {
        transform: translateY(-10px) rotate(5deg);
    }

    50% {
        transform: translateY(-5px) rotate(-5deg);
    }

    75% {
        transform: translateY(-15px) rotate(3deg);
    }
}

/* ========================================= */
/* RESPONSIVE DESIGN */
/* ========================================= */

@media (max-width: 991.98px) {
    .home-hero .display-3 {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
    }

    .home-hero h1 small {
        font-size: 1.1rem !important;
        display: block;
        margin-top: 10px;
    }

    .deer-hero-img {
        max-height: 350px;
        margin-top: 20px;
    }

    .quick-stats-section {
        margin-top: 0;
    }

    .stat-content h3 {
        font-size: 2.5rem;
    }

    .feature-item {
        margin-bottom: 20px;
    }

    .about-content {
        margin-top: 30px;
    }
}

@media (max-width: 767.98px) {
    .home-hero .display-3 {
        font-size: 2.2rem !important;
        line-height: 1.1 !important;
    }

    .home-hero h1 small {
        font-size: 1rem !important;
    }

    .deer-hero-img {
        max-height: 280px;
    }

    .stat-item {
        padding: 25px 20px;
        margin-bottom: 20px;
    }

    .stat-icon {
        width: 60px;
        height: 60px;
    }

    .stat-icon i {
        font-size: 1.5rem;
    }

    .stat-content h3 {
        font-size: 2.2rem;
    }

    .feature-item {
        padding: 30px 25px;
    }

    .feature-icon {
        width: 70px;
        height: 70px;
    }

    .feature-icon i {
        font-size: 1.7rem;
    }

    .floating-element {
        font-size: 1.5rem;
    }

    .cta-section .btn {
        padding: 12px 25px;
        margin-bottom: 10px;
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 576px) {
    .home-hero .display-3 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }

    .home-hero h1 small {
        font-size: 0.9rem !important;
    }

    .deer-badge {
        font-size: 0.95rem !important;
        padding: 8px 16px !important;
    }

    .deer-hero-img {
        max-height: 250px;
    }

    .stat-content h3 {
        font-size: 2rem;
    }

    .floating-element {
        font-size: 1.2rem;
    }

    .about-badge {
        font-size: 0.9rem;
        padding: 10px 15px;
    }

    .project-highlights .d-flex {
        margin-bottom: 15px;
    }

    .btn-sm-square {
        width: 30px;
        height: 30px;
    }
}

/* ========================================= */
/* ACCESSIBILITY IMPROVEMENTS */
/* ========================================= */

.stat-item:focus,
.feature-item:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:focus {
    box-shadow: 0 0 0 3px rgba(139, 69, 19, 0.25);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {

    .stat-item,
    .feature-item {
        border: 2px solid var(--dark);
    }

    .stat-icon,
    .feature-icon {
        background: var(--dark) !important;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {

    .stat-item,
    .feature-item,
    .show-on-load,
    .floating-element,
    .deer-hero-img {
        animation: none;
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* Print Styles */
@media print {

    .hero-header.home-hero.enhanced::before,
    .cta-section::before,
    .btn,
    .floating-elements {
        display: none !important;
    }

    .hero-header.home-hero.enhanced,
    .cta-section {
        background: white !important;
        color: black !important;
    }

    .hero-header.home-hero.enhanced .text-warning {
        color: #333 !important;
    }

    .stat-item,
    .feature-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}