/* ==========================================================================
   Front Page Styles
   ========================================================================== */

/* General Section Spacing */
.fp-section {
    padding: var(--spacing-lg) 0;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero-section {
    padding: var(--spacing-xxl) 0;
    text-align: center;
}

.hero-image-wrap {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 40px;
    overflow: hidden;
    aspect-ratio: 16/10;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-main-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.hero-image-wrap:hover .hero-main-img {
    transform: scale(1.03);
    /* Subtle unified zoom */
}

.hero-content.glass-card {
    position: absolute;
    /* Using absolute to guarantee perfect centering against the image */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 3.5rem 4rem;
    /* Balanced horizontal and vertical spacing inside the card */
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    width: 85%;
    /* Ensures consistent left/right spacing from image edges */
    max-width: 800px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 3.6rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -1.5px;
    font-family: var(--font-sans);
    line-height: 1.2;
    color: #000;
    /* Pure black for maximum contrast and punchiness */
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.6);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: #2a303c;
    /* Extremely dark bold gray for readability */
    line-height: 1.6;
    margin-bottom: 2.5rem;
    font-weight: 600;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--c-text-main);
    color: var(--c-bg);
}

.btn-primary:hover {
    background-color: var(--c-link-hover);
    color: var(--c-bg);
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--c-text-main);
    border-color: var(--c-border);
}

.btn-secondary:hover {
    border-color: var(--c-text-main);
    text-decoration: none;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
}

/* ==========================================================================
   Philosophy Block (Centered)
   ========================================================================== */
.philosophy-block {
    background-color: var(--c-bg-alt);
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--c-border);
    border-bottom: 1px solid var(--c-border);
    margin: var(--spacing-lg) 0;
    text-align: center;
    /* Force center */
}

.philosophy-content {
    max-width: 680px;
    margin: 0 auto;
    /* Center the content block */
    text-align: center;
}

.philosophy-block h3 {
    margin-top: 0;
    color: var(--c-text-muted);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-sans);
}

.philosophy-block p {
    font-size: 1.5rem;
    font-family: var(--font-serif);
    line-height: 1.6;
    margin-bottom: 0;
    color: var(--c-text-main);
}

/* ==========================================================================
   Section Title
   ========================================================================== */
.section-title {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
    margin-top: 0;
    border-bottom: 1px solid var(--c-border);
    padding-bottom: var(--spacing-xs);
    color: var(--c-text-muted);
    font-family: var(--font-sans);
    font-weight: 600;
}

/* ==========================================================================
   Featured Articles Card Grid (Image + Title below)
   ========================================================================== */
.fp-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.fp-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.fp-card {
    border: 1px solid var(--c-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--c-bg-alt);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fp-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    transform: translateY(-2px);
}

.fp-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
    display: block;
}

.fp-card-image--placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-family: var(--font-serif);
    color: #94a3b8;
}

.fp-card-body {
    padding: 1rem;
}

.fp-card-date {
    display: block;
    font-size: 0.8rem;
    color: var(--c-text-muted);
    margin-bottom: 0.4rem;
}

.fp-card-title {
    margin: 0;
    font-size: 1.05rem;
    font-family: var(--font-serif);
    line-height: 1.4;
    color: var(--c-text-main);
}

/* ==========================================================================
   Latest Articles — Two-column grid (Image right, Text left) RTL-aware
   ========================================================================== */
.fp-latest-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.fp-latest-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.fp-latest-item {
    display: flex;
    flex-direction: row-reverse;
    /* Image on right (RTL: natural right side) */
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid var(--c-border);
    border-radius: 12px;
    overflow: hidden;
    background: var(--c-bg-alt);
    padding: 1rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fp-latest-item:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
}

.fp-latest-image {
    flex: 0 0 110px;
    /* Fixed image width */
}

.fp-latest-image img {
    width: 110px;
    height: 90px;
    object-fit: cover;
    border-radius: 10px;
    /* Nice rounded corners, not sharp */
    display: block;
}

.fp-latest-image--placeholder {
    width: 110px;
    height: 90px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-family: var(--font-serif);
    color: #94a3b8;
}

.fp-latest-body {
    flex: 1;
}

.fp-latest-title {
    margin: 0 0 0.4rem 0;
    font-size: 1rem;
    line-height: 1.4;
    font-family: var(--font-serif);
    color: var(--c-text-main);
}

.fp-latest-excerpt {
    font-size: 0.88rem;
    color: var(--c-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ==========================================================================
   YouTube Section
   ========================================================================== */
.fp-youtube-section {
    margin-bottom: var(--spacing-xl);
}

.fp-youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.fp-youtube-item {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
}

.fp-youtube-item iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

.fp-youtube-placeholder {
    background: var(--c-bg-alt);
    border: 1px dashed var(--c-border);
    border-radius: 12px;
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: center;
    color: var(--c-text-muted);
    font-size: 0.95rem;
    grid-column: 1 / -1;
    /* Full width */
}

.fp-youtube-placeholder code {
    background: var(--c-bg);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--c-link);
}

/* ==========================================================================
   Newsletter CTA
   ========================================================================== */
.newsletter-cta {
    background-color: var(--c-bg-alt);
    padding: var(--spacing-lg);
    border-radius: 12px;
    border: 1px solid var(--c-border);
    margin: 0 auto var(--spacing-xl);
    max-width: 600px;
    text-align: center;
}

.text-center {
    text-align: center;
}

.minimal-subscribe-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.minimal-subscribe-form input[type="email"],
.minimal-subscribe-form input[type="text"]:not([name="website_url"]) {
    padding: 0.75rem 1rem;
    border: 1px solid var(--c-border);
    border-radius: 4px;
    width: 100%;
    font-family: var(--font-sans);
    background: var(--c-bg);
}

.minimal-subscribe-form .btn {
    border: none;
    cursor: pointer;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 768px) {
    .fp-latest-grid {
        grid-template-columns: 1fr;
        /* Stack to single column on mobile */
    }

    .fp-cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

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