/**
 * Theme Block Styles
 *
 * @package Astra-Child
 */

/* Full width blocks */
.hero-block,
.image-banner-block {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    position: relative;
}

/* Hero height - auto on mobile, viewport-based on desktop */
.hero-height {
    min-height: auto;
    height: auto;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

@media (min-width: 1024px) {
    .hero-height {
        height: calc(100vh - 80px); /* 80px = approximate header height */
        min-height: 600px;
        max-height: 900px;
        padding-top: 0;
        padding-bottom: 0;
    }
}

/* Gradient background - static, no animation */
.hero-gradient-bg {
    background: linear-gradient(
        -45deg,
        var(--color-hero-1, #1e293b),
        var(--color-hero-2, #0f172a),
        var(--color-hero-3, #134e4a),
        var(--color-hero-4, #1e3a5f)
    );
    background-size: 400% 400%;
    background-position: 50% 50%;
}

/* Stat card hover effects */
.hero-stat-card {
    position: relative;
    overflow: hidden;
    transition: background 0.2s ease;
}

.hero-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.hero-stat-card:hover::before {
    transform: scaleX(1);
}

.hero-stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Image - subtle zoom on hover */
.hero-image-shine img {
    transition: transform 0.5s ease;
}

.hero-image-shine:hover img {
    transform: scale(1.02);
}

/* Checklist card hover - subtle lift */
.hero-checklist-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-checklist-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

/* Card hover effect */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* ===================
   HERO ELEMENTS - All use --color-primary from Astra
   =================== */

/* Decorative glow */
.hero-glow {
    background: var(--color-primary);
    opacity: 0.1;
}

/* Badge dot */
.badge-dot {
    background: var(--color-primary);
}

/* Gradient text - uses primary with brightness filter for variation */
.gradient-text-primary {
    color: var(--color-primary);
    filter: brightness(1.15);
}

/* Stats numbers */
.stat-number {
    color: var(--color-primary);
    filter: brightness(1.15);
}

/* Image caption icon */
.caption-icon {
    color: var(--color-primary);
    filter: brightness(1.15);
}

/* Checklist card */
.checklist-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.checklist-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    flex-shrink: 0;
    background: var(--color-primary);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
    margin-top: 2px;
}

.checklist-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.checklist-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-slate-800, #1e293b);
    margin: 0 0 0.25rem 0;
    line-height: 1.3;
}

.checklist-description {
    color: var(--color-slate-500, #64748b);
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.4;
}

.checklist-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    color: var(--color-slate-600, #475569);
    font-size: 0.875rem;
    transition: background 0.2s;
}

.checklist-item:hover {
    background: var(--color-slate-50, #f8fafc);
}

.checklist-check {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #d1fae5; /* Emerald 100 - light green background */
}

.checklist-check svg {
    width: 12px;
    height: 12px;
    color: var(--color-primary);
}

/* Hero buttons - style Gutenberg buttons in dark context */
.hero-buttons .wp-block-buttons {
    gap: 0.75rem;
}

.hero-buttons .wp-block-button__link {
    padding: 0.75rem 1.5rem !important;
    font-weight: 600 !important;
    border-radius: 0.75rem !important;
}

.hero-buttons .wp-block-button.is-style-outline .wp-block-button__link {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.hero-buttons .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* Button hover - keep subtle */
.hero-block a {
    transition: all 0.2s ease;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .hero-block h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    .hero-block h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-stat-card {
        padding: 0.75rem;
    }
}

/* ===================
   TARGET GROUPS BLOCK
   =================== */

/* Full width */
.target-groups-block {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    position: relative;
}

/* Gradient background - similar to hero */
.target-groups-gradient-bg {
    background: linear-gradient(
        -45deg,
        #1e293b,
        #0f172a,
        #134e4a,
        #1e3a5f
    );
    background-size: 400% 400%;
    background-position: 50% 50%;
}

/* Target groups container */
.target-groups-container {
    max-width: calc(var(--container-width, 1280px) + 40px);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    display: block !important;
}

.target-groups-header {
    display: block !important;
    width: 100%;
}

/* Glass card effect */
.glass-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Target groups grid wrapper */
.target-groups-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1.5rem;
    width: 100%;
}

@media (min-width: 768px) {
    .target-groups-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .target-groups-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Target group card - reset to block display */
.target-group-card {
    display: block !important;
    height: 100%;
}

.target-group-card.glass-card {
    display: block !important;
}

/* Editor-specific styles */
.block-editor-block-list__layout .hero-block,
.block-editor-block-list__layout .image-banner-block,
.block-editor-block-list__layout .target-groups-block {
    margin-top: 0;
    margin-bottom: 0;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .hero-image-shine img,
    .hero-checklist-card,
    .hero-stat-card,
    .hero-block a {
        transition: none;
    }
}

/* ===================
   ABOUT PROJECT BLOCK
   =================== */

/* Full width */
.about-project-block {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    position: relative;
}

/* Container */
.about-project-container {
    max-width: calc(var(--container-width, 1280px) + 40px);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* Content area - style InnerBlocks */
.about-project-content h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-slate-800, #1e293b);
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

@media (min-width: 1024px) {
    .about-project-content h2 {
        font-size: 2.5rem;
    }
}

.about-project-content p {
    color: var(--color-slate-600, #475569);
    font-size: 1.125rem;
    line-height: 1.75;
    margin: 0 0 1rem 0;
}

.about-project-content p:last-child {
    margin-bottom: 0;
}

/* Stat boxes */
.about-stat-box {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-stat-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* Info card */
.about-info-card {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Editor styles */
.block-editor-block-list__layout .about-project-block {
    margin-top: 0;
    margin-bottom: 0;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .about-stat-box,
    .about-info-card {
        transition: none;
    }
}
