/**
 * Title Banner Widget Styles (Combined Hero + Cards)
 * 
 * @package Impact_Evaluator
 */

/* Title Banner Container */
.title-banner-container {
    position: relative;
    width: 100%;
    background: #020244;
}

/* Hero Section */
.title-banner-hero {
    padding: 60px 0;
    background: #020244;
    text-align: center;
}

.title-banner-hero .elementor-heading-title {
    padding: 0;
    margin: 0;
    line-height: 1;
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-transform: none;
    margin-bottom: 20px;
}

.title-banner-hero .hero-subtitle {
    color: #ffffff;
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    margin-top: 15px;
    opacity: 0.9;
}

/* Cards Section */
.title-banner-cards {
    padding: 20px 0 40px;
    background: #020244;
}

.title-banner-cards .elementor-widget-text-editor h3,
.title-banner-cards .card-title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    text-align: center;
}

/* Card Buttons */
.card-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

/* Button Layout Options */
.card-buttons-horizontal {
    flex-direction: row;
    align-items: center;
}

.card-buttons-vertical {
    flex-direction: column;
    align-items: center;
}

/* Button width adjustments for different layouts */
.card-buttons-horizontal .elementor-button {
    flex: 0 0 auto;
    min-width: 120px;
}

.card-buttons-vertical .elementor-button {
    width: 100%;
    max-width: 200px;
    text-align: center;
}

.elementor-button {
    background: #590000;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.elementor-button:hover {
    background: #252525;
    color: #ffffff;
    text-decoration: none;
}

/* Elementor Grid Layout */
.title-banner-cards .elementor-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.title-banner-cards .elementor-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: stretch;
}

.title-banner-cards .elementor-column {
    flex: 1;
    min-width: 300px;
}

.title-banner-cards .elementor-col-33 {
    flex: 0 0 calc(33.333% - 14px);
}

.title-banner-cards .elementor-widget-wrap {
    height: 100%;
}

.title-banner-cards .elementor-element {
    height: 100%;
}

.title-banner-cards .elementor-widget-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .title-banner-hero .elementor-heading-title {
        font-size: 2.2rem;
    }
    
    .title-banner-cards .elementor-col-33 {
        flex: 0 0 calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .title-banner-hero {
        padding: 40px 0;
    }
    
    .title-banner-hero .elementor-heading-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .title-banner-hero .hero-subtitle {
        font-size: 1rem;
    }
    
    .title-banner-cards {
        padding: 15px 0 30px;
    }
    
    .title-banner-cards .elementor-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .title-banner-cards .elementor-col-33 {
        flex: 1;
        min-width: auto;
    }
    
    .card-buttons {
        gap: 10px;
    }

    /* Force vertical layout on mobile for better UX */
    .card-buttons-horizontal {
        flex-direction: column;
    }

    .card-buttons-vertical {
        flex-direction: column;
    }
    
    .elementor-button {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .title-banner-hero .elementor-heading-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .title-banner-hero .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .title-banner-cards .card-title {
        font-size: 14px;
        margin-bottom: 15px;
    }
    
    .elementor-button {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Animation Effects */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.title-banner-hero .elementor-heading-title,
.title-banner-hero .hero-subtitle {
    animation: fadeInUp 0.8s ease-out forwards;
}

.title-banner-hero .hero-subtitle {
    animation-delay: 0.2s;
}

.title-banner-cards .elementor-column {
    animation: fadeInUp 0.6s ease-out forwards;
}

.title-banner-cards .elementor-column:nth-child(1) {
    animation-delay: 0.1s;
}

.title-banner-cards .elementor-column:nth-child(2) {
    animation-delay: 0.2s;
}

.title-banner-cards .elementor-column:nth-child(3) {
    animation-delay: 0.3s;
}

/* Elementor Editor Specific Styles */
.elementor-editor-active .title-banner-hero .elementor-heading-title,
.elementor-editor-active .title-banner-hero .hero-subtitle,
.elementor-editor-active .title-banner-cards .elementor-column {
    animation: none;
}

/* Enhanced Button Styles */
.elementor-button {
    position: relative;
    overflow: hidden;
}

.elementor-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.elementor-button:hover::before {
    left: 100%;
}

/* Focus States for Accessibility */
.elementor-button:focus {
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .title-banner-container {
        background: #000000;
    }
    
    .title-banner-hero,
    .title-banner-cards {
        background: #000000;
    }
    
    .title-banner-hero .elementor-heading-title,
    .title-banner-hero .hero-subtitle,
    .title-banner-cards .card-title {
        color: #ffffff;
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
    }
    
    .elementor-button {
        border: 2px solid #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .title-banner-hero .elementor-heading-title,
    .title-banner-hero .hero-subtitle,
    .title-banner-cards .elementor-column {
        animation: none;
    }
    
    .elementor-button {
        transition: none;
    }
    
    .elementor-button::before {
        display: none;
    }
}

/* Print Styles */
@media print {
    .title-banner-container {
        background: #ffffff !important;
        color: #000000 !important;
    }
    
    .title-banner-hero,
    .title-banner-cards {
        background: #ffffff !important;
        padding: 20px 0 !important;
    }
    
    .title-banner-hero .elementor-heading-title,
    .title-banner-hero .hero-subtitle,
    .title-banner-cards .card-title {
        color: #000000 !important;
    }
    
    .elementor-button {
        display: none;
    }
    
    .title-banner-cards .elementor-row {
        flex-direction: column;
    }
}
