/* ==========================================================================
   MEGA MENU STYLES
   Development CSS for mega menu - will be merged into main.css when finalized
   ========================================================================== */

/* Mega Menu Container */
.has-mega-menu {
    position: static;
}

.mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: 
        linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
        url('/assets/images/farms.jpg') center center / cover no-repeat;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
    border-top: 3px solid var(--primary-color);
}

.has-mega-menu:hover .mega-menu,
.has-mega-menu:focus-within .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Keep nav link highlighted while mega menu is open */
.has-mega-menu:hover > .nav-link,
.has-mega-menu:focus-within > .nav-link {
    color: var(--secondary-color);
}

.mega-menu-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    gap: 2rem;
}

/* Image Cards Container */
.mega-menu-images {
    display: flex;
    gap: 0.75rem;
    flex: 1;
    height: 220px;
}

/* Individual Image Card */
.mega-image-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    flex: 1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.mega-image-card:hover {
    text-decoration: none;
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

/* Background Image */
.mega-image-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: transform 0.4s ease;
}

.mega-image-card:hover .mega-image-bg {
    transform: scale(1.05);
}

/* Color Overlays - White gradient from bottom */
.mega-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.4) 40%, rgba(255, 255, 255, 0) 70%);
    transition: opacity 0.3s ease;
}

/* Slightly reduce overlay on hover to show more image */
.mega-image-card:hover .mega-image-overlay {
    opacity: 0.8;
}

/* Content */
.mega-image-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem;
    z-index: 2;
}

.mega-image-title {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: itc-american-typewriter, serif;
    letter-spacing: 0.02em;
    transition: color 0.3s ease, transform 0.3s ease;
}

/* Red title for Meet Don */
.mega-image-primary .mega-image-title {
    color: var(--primary-color);
}

/* Orange/Yellow title for Contact */
.mega-image-secondary .mega-image-title {
    color: var(--secondary-color);
}

.mega-image-card:hover .mega-image-title {
    transform: translateX(4px);
}

/* Links Section */
.mega-menu-links {
    width: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.mega-menu-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mega-menu-links ul li {
    margin-bottom: 0.75rem;
}

.mega-menu-links ul li a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: itc-american-typewriter, serif;
    padding: 0.5rem 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.mega-menu-links ul li a:hover {
    color: var(--primary-color);
    transform: translateX(4px);
}

.mega-menu-links ul li a i {
    color: var(--secondary-color);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

/* Social Icons in Mega Menu */
.mega-menu-social {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.mega-menu-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--text-dark);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mega-menu-social a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

/* ==========================================================================
   SOLUTIONS MEGA MENU - Accordion-style image gallery
   ========================================================================== */

.mega-menu-solutions .mega-menu-inner {
    padding: 1.5rem 2rem;
}

.mega-menu-solutions .mega-menu-images {
    height: 200px;
}

/* Solutions Gallery - 4 cards with expand/contract */
.solutions-gallery {
    display: flex;
    gap: 0.5rem;
}

.solutions-gallery .solutions-card {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    transition: flex 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

/* Default state: first card 40%, others 20% each */
.solutions-gallery .solutions-card {
    flex: 2;
}

.solutions-gallery .solutions-card.active,
.solutions-gallery .solutions-card:first-child {
    flex: 4;
}

/* On hover of the gallery, collapse all to 20% */
.solutions-gallery:hover .solutions-card {
    flex: 2;
}

/* Expand hovered card to 40% */
.solutions-gallery:hover .solutions-card:hover {
    flex: 4;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

/* Solutions card title styling - matches Meet Don styling */
.solutions-card .mega-image-title {
    font-size: 1.35rem;
    font-weight: 700;
    font-family: itc-american-typewriter, serif;
    letter-spacing: 0.02em;
    transition: opacity 0.3s ease, transform 0.3s ease, font-size 0.3s ease;
}

/* All red titles */
.solutions-card .mega-image-title {
    color: var(--primary-color);
}

/* Collapsed cards: smaller title */
.solutions-gallery:hover .solutions-card:not(:hover) .mega-image-title {
    font-size: 1rem;
    opacity: 0.85;
}

/* Solutions overlay - white gradient like Meet Don */
.solutions-card .mega-image-overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.4) 40%, rgba(255, 255, 255, 0) 70%);
}

/* Hide mega menu on mobile - will use standard off-canvas */
@media (max-width: 1024px) {
    .has-mega-menu .mega-menu {
        display: none;
    }
}
