/**
 * Theme Name:     Hello Elementor Child
 * Author:         Elementor Team
 * Template:       hello-elementor
 * Text Domain:	   hello-elementor-child
 * Description:    Hello Elementor is a lightweight and minimalist WordPress theme that was built specifically to work seamlessly with the Elementor site builder plugin. The theme is free, open-source, and designed for users who want a flexible, easy-to-use, and customizable website. The theme, which is optimized for performance, provides a solid foundation for users to build their own unique designs using the Elementor drag-and-drop site builder. Its simplicity and flexibility make it a great choice for both beginners and experienced Web Creators.
 */

/* cards-base.css – put in your theme's main stylesheet */
.cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin: 40px 0;
}

.card-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--light-bg-color, #f8f9fa);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.2);
    width: calc(25% - 22.5px);
	margin-bottom:0px!important;
}
.card-item:nth-child(4n) { margin-right: 0; }

.card-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card-image {
    position: relative;
    height: 260px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    background-color: var(--light-bg-color, #f8f9fa);
}
.card-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.card-overlay {
    position: relative;
    z-index: 2;
    padding: 25px 20px;
    width: 100%;
    color: #fff;
}

.card-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.card-excerpt {
    font-size: 0.95rem;
    margin-bottom: 20px;
    opacity: 0.95;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.card-btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.card-btn:hover {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Responsive Flex Grid */
@media (max-width: 1024px) {
    .card-item {
        width: calc(33.333% - 20px);
    }
    .card-item:nth-child(4n) { margin-right: 30px; }
    .card-item:nth-child(3n) { margin-right: 0; }
}
@media (max-width: 768px) {
    .card-item {
        width: calc(50% - 15px);
    }
    .card-item:nth-child(3n) { margin-right: 30px; }
    .card-item:nth-child(2n) { margin-right: 0; }
}
@media (max-width: 480px) {
    .card-item {
        width: 100%;
        margin-right: 0 !important;
    }
}




/* ===== Enhanced Dropdown Menu ===== */

/* Parent menu items with dropdowns */
.menu-item-has-children {
    position: relative;
}

/* Parent link styling */
.menu-item-has-children > a {
    position: relative;
    padding-right: 15px !important;
}

/* Arrow indicator */
.menu-item-has-children > a::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    transition: transform 0.3s ease;
}

/* Rotate arrow on hover */
.menu-item-has-children:hover > a::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Sub-menu base styles */
.sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 240px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
    padding: 12px 10px!important;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
    border: 1px solid rgba(0,0,0,0.05);
}

/* Show sub-menu on hover */
.menu-item-has-children:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(8px);
}

/* Sub-menu items */
.sub-menu li {
    position: relative;
    margin: 0;
    padding: 0;
}

.sub-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
	text-transform:capitalize!important;
}

/* Hover effect for sub-menu items */
.sub-menu a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-color, #007bff);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.sub-menu a:hover {
    background: #f8f9fa;
    color: var(--primary-color, #007bff);
    padding-left: 28px;
}

.sub-menu a:hover::before {
    transform: scaleY(1);
}

/* Second-level sub-menu */
.sub-menu .menu-item-has-children {
    position: relative;
}

.sub-menu .menu-item-has-children > a::after {
    content: '›';
    position: absolute;
    right: 20px;
    font-size: 18px;
    font-weight: 400;
    transition: right 0.2s ease;
}

.sub-menu .menu-item-has-children:hover > a::after {
    right: 15px;
}

.sub-menu .menu-item-has-children > .sub-menu {
    top: 0;
    left: 100%;
    margin-left: 8px;
    transform: translateX(10px);
}

.sub-menu .menu-item-has-children:hover > .sub-menu {
    transform: translateX(0);
}

/* First item top border radius */
.sub-menu li:first-child a {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

/* Last item bottom border radius */
.sub-menu li:last-child a {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Mobile styles */
@media (max-width: 768px) {
    .menu-item-has-children .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: transparent;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding: 0 0 0 20px;
        margin: 5px 0;
    }
    
    .menu-item-has-children:hover > .sub-menu {
        display: block;
    }
    
    .sub-menu a {
        padding: 10px 15px;
        background: #f8f9fa;
        margin: 2px 0;
        border-radius: 6px;
    }
    
    .sub-menu a:hover {
        padding-left: 20px;
    }
    
    .sub-menu .menu-item-has-children > .sub-menu {
        margin-left: 15px;
    }
}