/* Phramea CMS - Frontend Page Widgets (Sohtorik Theme) */
.page-widgets { overflow-x: hidden; }
.pw-section { padding: 3.5rem 0; }
.pw-section-alt { background: var(--light-bg, #f8f9fa); }
body.dark-theme .pw-section-alt { background: var(--dark-card, #171d2e); }

.pw-section-title { font-size: 1.75rem; font-weight: 800; color: var(--secondary, #003D5C); }
body.dark-theme .pw-section-title { color: #6cc3ce; }
.pw-prose { line-height: 1.85; }
.pw-prose img { max-width: 100%; height: auto; border-radius: .5rem; }
.pw-width-wide .container { max-width: 1140px; }
.pw-width-full { padding-left: 0; padding-right: 0; }
.pw-width-full .container { max-width: 100%; padding: 0 1rem; }

/* Hero widget */
.pw-hero {
    position: relative; min-height: var(--pw-hero-h, 420px); display: flex; align-items: center;
    overflow: hidden; color: #fff;
}
.pw-hero-bg { position: absolute; inset: 0; background: var(--secondary); }
.pw-hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.pw-hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0,61,92,.92), rgba(11,143,163,.75)); opacity: var(--pw-overlay, .55); }
.pw-hero-content { position: relative; z-index: 1; padding: 3rem 0; }
.pw-hero-align-center .pw-hero-content { text-align: center; margin-inline: auto; }
.pw-hero-align-end .pw-hero-content { text-align: end; margin-inline-start: auto; }
.pw-hero-title { font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 800; margin-bottom: .75rem; }
.pw-hero-subtitle { font-size: 1.1rem; opacity: .92; max-width: 640px; margin-bottom: 1.5rem; }
.pw-hero-align-center .pw-hero-subtitle { margin-inline: auto; }
.pw-hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.pw-hero-align-center .pw-hero-actions { justify-content: center; }
.pw-hero-align-end .pw-hero-actions { justify-content: flex-end; }

.pw-img-rounded { border-radius: .75rem; box-shadow: 0 12px 32px rgba(0,0,0,.1); object-fit: contain; max-height: 480px; }

/* Features */
.pw-feature-card {
    background: #fff; border-radius: .75rem; padding: 1.75rem 1.25rem; text-align: center;
    border: 1px solid rgba(0,61,92,.08); transition: .25s; height: 100%;
}
body.dark-theme .pw-feature-card { background: var(--dark-card); border-color: var(--dark-border); }
.pw-feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(11,143,163,.12); }
.pw-feature-icon {
    width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
    background: rgba(11,143,163,.12); color: var(--primary); font-size: 1.35rem;
}

/* Stats */
.pw-stats-section { background: linear-gradient(135deg, var(--secondary), var(--primary)); color: #fff; }
.pw-stat-number { font-size: 2.75rem; font-weight: 800; line-height: 1; }
.pw-stat-item .text-muted { color: rgba(255,255,255,.75) !important; }

/* CTA */
.pw-cta { border-radius: .85rem; padding: 2.5rem 2rem; text-align: center; color: #fff; }
.pw-cta-primary { background: linear-gradient(135deg, var(--primary), var(--secondary)); }
.pw-cta-dark { background: var(--secondary); }
.pw-cta-light { background: var(--light-bg); color: var(--secondary); border: 1px solid rgba(0,61,92,.1); }

/* Gallery */
.pw-gallery-item { display: block; border-radius: .65rem; overflow: hidden; aspect-ratio: 4/3; }
.pw-gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: .3s; }
.pw-gallery-item:hover img { transform: scale(1.05); }

/* Team */
.pw-team-card { background: #fff; border-radius: .75rem; padding: 1.5rem; border: 1px solid rgba(0,61,92,.08); }
body.dark-theme .pw-team-card { background: var(--dark-card); border-color: var(--dark-border); }
.pw-team-photo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; border: 3px solid rgba(11,143,163,.35); }

/* Contact */
.pw-contact-list li { margin-bottom: .75rem; }
.pw-map-embed iframe { width: 100%; min-height: 280px; border: 0; border-radius: .65rem; }

/* Divider */
.pw-divider-line { height: 1px; background: rgba(0,61,92,.12); }
.pw-divider-dots { height: 8px; background: radial-gradient(circle, var(--primary) 2px, transparent 2px); background-size: 12px 8px; opacity: .5; }
.pw-divider-gradient { height: 3px; background: linear-gradient(90deg, transparent, var(--primary), transparent); border-radius: 2px; }
.pw-divider-line, .pw-divider-dots, .pw-divider-gradient { width: 100%; }

.page-featured-hero {
    min-height: 280px; background-size: cover; background-position: center;
    position: relative; display: flex; align-items: flex-end;
}
.page-featured-hero::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 20%, rgba(0,61,92,.85));
}
.page-featured-hero .container { position: relative; z-index: 1; padding-bottom: 2rem; }

@media (max-width: 767.98px) {
    .pw-section { padding: 2.5rem 0; }
    .pw-hero { min-height: 320px; }
    .pw-image-text.flex-row-reverse { flex-direction: column !important; }
}

/* Section heading */
.pw-section-heading.pw-align-center { text-align: center; }
.pw-section-heading.pw-align-end { text-align: end; }
.pw-section-subtitle { max-width: 680px; margin-inline: auto; }

/* Testimonials */
.pw-testimonial-card {
    background: #fff; border-radius: .85rem; padding: 1.5rem;
    border: 1px solid rgba(0,61,92,.08); box-shadow: 0 4px 16px rgba(0,61,92,.05);
}
body.dark-theme .pw-testimonial-card { background: var(--dark-card); border-color: var(--dark-border); }
.pw-testimonial-quote { font-style: italic; color: #475569; line-height: 1.7; margin: 0; }
.pw-testimonial-author { display: flex; align-items: center; gap: .75rem; }
.pw-testimonial-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }

/* Timeline */
.pw-timeline { position: relative; padding-left: 1.5rem; border-left: 3px solid rgba(11,143,163,.35); }
.pw-timeline-item { position: relative; padding-bottom: 1.75rem; padding-left: 1.25rem; }
.pw-timeline-item::before {
    content: ''; position: absolute; left: -1.72rem; top: .25rem;
    width: 14px; height: 14px; border-radius: 50%; background: var(--primary); border: 3px solid #fff;
    box-shadow: 0 0 0 2px rgba(11,143,163,.3);
}
.pw-timeline-year { font-weight: 800; color: var(--primary); font-size: .875rem; margin-bottom: .25rem; }
.pw-timeline-content { background: #fff; border-radius: .65rem; padding: 1rem 1.15rem; border: 1px solid rgba(0,61,92,.08); }
body.dark-theme .pw-timeline-content { background: var(--dark-card); border-color: var(--dark-border); }

/* Tabs */
.pw-tabs-nav { border-bottom-color: rgba(0,61,92,.12); gap: .25rem; }
.pw-tabs-nav .nav-link { font-weight: 600; color: #64748b; white-space: nowrap; border: none; border-bottom: 2px solid transparent; }
.pw-tabs-nav .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }
body.dark-theme .pw-tabs-content { background: var(--dark-card) !important; border-color: var(--dark-border) !important; color: var(--body-text-dark); }

/* Icon list */
.pw-icon-list-item {
    display: flex; align-items: flex-start; gap: .75rem;
    padding: .75rem 0; border-bottom: 1px solid rgba(0,61,92,.08);
}
.pw-icon-list-icon {
    width: 36px; height: 36px; flex-shrink: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: rgba(11,143,163,.1); color: var(--primary);
}

/* Logo strip */
.pw-logo-strip {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1.5rem 2rem;
}
.pw-logo-strip img { max-height: 52px; max-width: 140px; object-fit: contain; transition: .3s; }
.pw-logo-grayscale img { filter: grayscale(100%); opacity: .65; }
.pw-logo-grayscale img:hover { filter: none; opacity: 1; }

/* Image banner */
.pw-image-banner {
    position: relative; min-height: var(--pw-banner-h, 360px);
    display: flex; align-items: flex-end; overflow: hidden; color: #fff;
}
.pw-image-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pw-image-banner-overlay { position: absolute; inset: 0; background: #003D5C; opacity: var(--pw-banner-overlay, .3); }
.pw-image-banner-caption { position: relative; z-index: 1; padding: 2rem 0; }

/* Table */
.pw-spec-table { border-radius: .65rem; overflow: hidden; }
.pw-spec-table thead { background: var(--secondary); color: #fff; }
.pw-spec-table th, .pw-spec-table td { vertical-align: middle; padding: .85rem 1rem; }

/* Before/after */
.pw-before-after-card { position: relative; border-radius: .75rem; overflow: hidden; border: 1px solid rgba(0,61,92,.1); }
.pw-before-after-card img { width: 100%; height: auto; display: block; object-fit: cover; min-height: 200px; }
.pw-ba-label {
    position: absolute; top: .75rem; left: .75rem; z-index: 1;
    background: var(--primary); color: #fff; font-size: .75rem; font-weight: 700;
    padding: .25rem .65rem; border-radius: 999px;
}

/* Download cards */
.pw-download-card {
    display: flex; align-items: center; gap: 1rem; padding: 1rem 1.15rem;
    background: #fff; border-radius: .75rem; border: 1px solid rgba(0,61,92,.1);
    text-decoration: none; color: inherit; transition: .25s;
}
.pw-download-card:hover { border-color: var(--primary); box-shadow: 0 8px 20px rgba(11,143,163,.12); color: inherit; transform: translateY(-2px); }
body.dark-theme .pw-download-card { background: var(--dark-card); border-color: var(--dark-border); }
.pw-download-icon { width: 48px; height: 48px; border-radius: .5rem; background: rgba(11,143,163,.1); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; }

/* Button groups */
.pw-btn-group-center { justify-content: center; }
.pw-btn-group-start { justify-content: flex-start; }
.pw-btn-group-end { justify-content: flex-end; }

/* Embed */
.pw-embed-wrap iframe, .pw-embed-wrap video { max-width: 100%; border-radius: .65rem; }
.pw-embed-full .pw-embed-wrap { width: 100%; }

/* Alert widget */
.pw-alert-box { border-radius: .75rem; }

@media (max-width: 767.98px) {
    .pw-tabs-nav { -webkit-overflow-scrolling: touch; }
    .pw-logo-strip img { max-height: 40px; max-width: 100px; }
    .pw-stat-number { font-size: 2rem; }
}
