/* Page Builder Frontend Styles */

.upb-container {
    width: 100%;
}

.upb-row {
    margin-bottom: 40px;
}

.upb-column {
    padding: 0;
}

/* Text Components */
.upb-heading {
    margin-bottom: 20px;
    font-weight: 700;
    color: #1f2937;
}

.upb-subheading {
    margin-bottom: 15px;
    font-weight: 600;
    color: #374151;
}

.upb-paragraph {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #6b7280;
}

/* Image Component */
.upb-image-wrapper {
    margin-bottom: 20px;
}

.upb-image-wrapper.upb-align-left {
    text-align: left;
}

.upb-image-wrapper.upb-align-center {
    text-align: center;
}

.upb-image-wrapper.upb-align-right {
    text-align: right;
}

.upb-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Hero Section - Full Width */
.hero-section,
.upb-container .hero-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 0;
}

/* Stats Section - Full Width */
.stats-section,
.upb-container .stats-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 0;
}

/* CTA Section - Full Width */
.cta-section,
.upb-container .cta-section {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 0;
}

/* Old Hero Section styles (keeping for backward compatibility) */
.upb-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 40px;
    border-radius: 12px;
    overflow: hidden;
}

.upb-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 72, 120, 0.8) 0%, rgba(61, 127, 197, 0.8) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upb-hero-content {
    text-align: center;
    color: #fff;
    z-index: 1;
    max-width: 800px;
    padding: 40px 20px;
}

.upb-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    animation: fadeInUp 0.8s ease;
}

.upb-hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 0.8s ease 0.2s;
    animation-fill-mode: both;
}

.upb-hero-button {
    display: inline-block;
    padding: 14px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    background: #fff;
    color: #1a4878;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: fadeInUp 0.8s ease 0.4s;
    animation-fill-mode: both;
}

.upb-hero-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
    color: #1a4878;
    text-decoration: none;
}

/* Half Hero Section */
.upb-half-hero {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 30px;
    border-radius: 8px;
    overflow: hidden;
}

.upb-half-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 72, 120, 0.75) 0%, rgba(61, 127, 197, 0.75) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.upb-half-hero-content {
    text-align: center;
    color: #fff;
    z-index: 1;
    max-width: 600px;
    padding: 30px 20px;
}

.upb-half-hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

.upb-half-hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 25px;
    color: rgba(255, 255, 255, 0.9);
}

.upb-half-hero-button {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    background: #fff;
    color: #1a4878;
    text-decoration: none;
    transition: all 0.3s ease;
}

.upb-half-hero-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 255, 255, 0.3);
    color: #1a4878;
    text-decoration: none;
}

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

/* Responsive */
@media (max-width: 991px) {
    /* Fix hero section: reverse column order on mobile so logo appears first */
    .hero-section .row {
        display: flex !important;
        flex-direction: column-reverse !important;
    }

    /* Ensure hero-content elements are in correct order and centered */
    .hero-section .hero-content {
        display: flex !important;
        flex-direction: column !important;
        text-align: center !important;
        align-items: center !important;
    }

    .hero-section .hero-content .hero-icon {
        order: 1 !important;
        margin-bottom: 1rem !important;
    }

    .hero-section .hero-content h1 {
        order: 2 !important;
    }

    .hero-section .hero-content p {
        order: 3 !important;
    }

    .hero-section .hero-content .hero-buttons {
        order: 4 !important;
    }

    /* Add spacing for logo in collage */
    .hero-section .hero-collage {
        margin-bottom: 2rem !important;
        text-align: center !important;
    }
}

@media (max-width: 768px) {
    .upb-hero {
        min-height: 400px;
    }

    .upb-hero-title {
        font-size: 2.5rem;
    }

    .upb-hero-subtitle {
        font-size: 1rem;
    }

    .upb-half-hero {
        min-height: 250px;
    }

    .upb-half-hero-title {
        font-size: 2rem;
    }

    .upb-half-hero-subtitle {
        font-size: 1rem;
    }

    .upb-column {

    }
}
