/*
Theme Name: Agrocor
Theme URI: https://github.com/agrocor
Description: Starter base theme for Agrocor with dynamic color capabilities.
Version: 1.0.0
Author: Antigravity
Author URI: https://deepmind.google
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: agrocor
*/

/* Reset & Default Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
}

body,
button,
input,
select,
textarea,
.btn {
    font-family: 'Poppins', sans-serif !important;
}

/* Global subheadline styles for blocks */
.about-carousel-subheadline {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--secondary-color) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Global Dynamic Styling Overrides */
a {
    color: var(--primary-color);
}

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

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

/* Dynamic Bootstrap Button Overrides */
.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    height: 50px;
    padding: 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 15px;
    box-shadow: none !important;
    text-shadow: none;
    letter-spacing: 0.5px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    min-width: 200px;
    font-weight: 500;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    opacity: 0.9;
}

.btn-secondary {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
}

.btn-secondary:hover,
.btn-secondary:focus,
.btn-secondary:active {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    opacity: 0.9;
}

/* Header & Navigation Styles */
header.site-header {
    background: #ffffff;
}

header.site-header .nav-link:hover {
    color: var(--primary-color) !important;
}

header .navbar-nav a {
    text-decoration: none;
    color: var(--secondary-color) !important;
    font-weight: 500;
}

header .current-menu-item {
    position: relative;
}

header .current-menu-item a {
    position: relative;
    z-index: 2;
    color: var(--primary-color) !important;
}

/* Version 1: Circle indicator */
header.menu-active-v1 .current-menu-item::before {
    content: '';
    background: var(--primary-color);
    opacity: 0.2;
    width: 19px;
    height: 19px;
    position: absolute;
    border-radius: 100%;
    left: -7px;
    top: 2px;
}

/* Version 2: Pill Underline (55px width, 6px height, 50% border radius) */
header.menu-active-v2 .current-menu-item a::after {
    content: '';
    background: var(--primary-color);
    width: 100%;
    height: 6px;
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 30px;
}

/* Footer Styles */
footer.site-footer {
    background: var(--secondary-color);
    color: #ffffff !important;
    padding-top: 3rem;
    padding-bottom: 1.5rem;
}

footer.site-footer p,
footer.site-footer span,
footer.site-footer li,
footer.site-footer div {
    color: rgba(255, 255, 255, 0.8) !important;
}

footer.site-footer a {
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none;
    transition: color 0.2s;
}

footer.site-footer a:hover {
    color: #ffffff !important;
}

footer.site-footer .footer-menu-list {
    padding-left: 0;
}

footer.site-footer .footer-menu-list li {
    margin-bottom: 0.5rem;
}

footer.site-footer .social-icons a {
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.08);
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #fff;
    transition: all 0.2s;
}

footer.site-footer .social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

footer.site-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #888;
}

/* Floating Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.back-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

/* Single Post Template Styles */
.single-post-hero {
    height: 55vh;
    min-height: 380px;
    background-size: cover;
    background-position: center;
    position: relative;
    padding-top: 60px;
}

.single-post-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
}

.single-article-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: -80px;
    /* Overlap into the hero banner for high-end look */
    position: relative;
    z-index: 10;
}

.entry-content-single p {
    font-size: 1.05rem;
    line-height: 1.85;
    margin-bottom: 1.75rem;
    color: #333333;
}

.entry-content-single blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    background-color: #fcfdfc;
    font-style: italic;
    font-size: 1.15rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.hover-primary:hover {
    color: var(--primary-color) !important;
}

.letter-spacing-1 {
    letter-spacing: 1px;
}

.transition-all {
    transition: all 0.25s ease;
}

/* Archive & News Card Styles */
.archive-hero {
    height: 40vh;
    min-height: 280px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.archive-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.archive-hero .container {
    z-index: 2;
}

.news-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08) !important;
}

.news-thumbnail-box img {
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .news-thumbnail-box img {
    transform: scale(1.05);
}

.news-title a {
    color: #102a18 !important;
    transition: color 0.25s ease;
}

.news-title a:hover {
    color: var(--primary-color) !important;
}

/* Contact Form Styling */
.contact-info-panel,
.contact-form-panel {
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--primary-color) 15%, transparent);
}

.wpcf7-spinner {
    position: absolute;
}

/* Custom Modern Hamburger Toggle */
.navbar-toggler {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.custom-toggler-icon {
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    display: block;
    position: relative;
    transition: background-color 0.2s ease;
}

.custom-toggler-icon::before,
.custom-toggler-icon::after {
    content: '';
    width: 24px;
    height: 2px;
    background-color: var(--primary-color);
    position: absolute;
    left: 0;
    transition: transform 0.3s ease, top 0.3s ease;
}

.custom-toggler-icon::before {
    top: -8px;
}

.custom-toggler-icon::after {
    top: 8px;
}

/* Animation when opened */
.navbar-toggler:not(.collapsed) .custom-toggler-icon {
    background-color: transparent !important;
}

.navbar-toggler:not(.collapsed) .custom-toggler-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.navbar-toggler:not(.collapsed) .custom-toggler-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

/* Mobile Dropdown Panel */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background: #ffffff;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
        border-radius: 16px;
        padding: 1.5rem;
        margin-top: -2px;
        position: absolute;
        top: 100%;
        left: 15px;
        right: 15px;
        z-index: 999;
        border: 1px solid rgba(0, 0, 0, 0.05);
        transform-origin: top;
        animation: slideDownMenu 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    }

    .navbar-nav .nav-link {
        padding: 0.8rem 1.2rem !important;
        border-radius: 10px;
        transition: all 0.2s ease;
    }

    .navbar-nav .nav-link:hover {
        background-color: color-mix(in srgb, var(--primary-color) 8%, transparent);
        color: var(--primary-color) !important;
    }

    header .navbar-brand img {
        width: 100% !important;
    }

    /* Indicator circle adjustment for mobile */
    header.menu-active-v1 .current-menu-item::before {
        left: -6px;
        top: 3px;
    }

    /* Underline adjustment for mobile */
    header.menu-active-v2 .current-menu-item a::after {
        left: 1.2rem;
        transform: none;
        bottom: 2px;
    }
}

@keyframes slideDownMenu {
    from {
        opacity: 0;
        transform: scaleY(0.9);
    }

    to {
        opacity: 1;
        transform: scaleY(1);
    }
}

/* Header v2: Floating Capsule */
header.site-header.header-v2 {
    position: absolute;
    top: 24px;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent !important;
    border: none !important;
}

header.site-header.header-v2 .container {
    background: #ffffff;
    border-radius: 100px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    padding: 0.6rem 2.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* Offset page content top margin slightly for non-home pages when header-v2 is active */
body.has-header-v2:not(.home) .site-main {
    padding-top: 120px !important;
}

/* Header Action Button hover customization */
.header-action-btn .btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    transition: all 0.25s ease;
}

.header-action-btn .btn-primary:hover {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--secondary-color) 30%, transparent);
}

@media (max-width: 991.98px) {
    header.site-header.header-v2 .container {
        border-radius: 30px;
        padding: 0.6rem 1.5rem;
    }
    header.site-header.header-v2 .navbar-collapse {
        margin-top: 12px;
        border-radius: 20px;
    }
}