/*
 * Clear Guidance Page – ALTERNATING ZIGZAG layout (image/text rows)
 * Distinct from other pages: no stats strip, no card grid
 * KIIT Entrance Wings | Bootstrap 5
 * Image paths: ./images/clear-guidance/ (add your images there)
 */

/* ===== Page wrapper ===== */
.clear-guidance-page .content-section {
    background: #fff;
    padding: 0;
}

/* ===== Zigzag rows – alternate image left/right ===== */
.cg-zigzag-row {
    display: grid;
    gap: 0;
    min-height: 280px;
    align-items: stretch;
}
@media (min-width: 768px) {
    .cg-zigzag-row { grid-template-columns: 1fr 1fr; }
    .cg-zigzag-row.cg-reverse { direction: rtl; }
    .cg-zigzag-row.cg-reverse > * { direction: ltr; }
}
.cg-zigzag-img {
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    min-height: 220px;
    position: relative;
}
.cg-zigzag-img img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
    display: block;
}
.cg-zigzag-body {
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.cg-zigzag-body h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0a1628;
    margin: 0 0 0.5rem;
}
.cg-zigzag-body p {
    font-size: 0.95rem;
    color: #475569;
    margin: 0;
    line-height: 1.7;
}
.cg-zigzag-body .cg-num {
    font-size: 0.75rem;
    font-weight: 800;
    color: #16a34a;
    margin-bottom: 0.5rem;
    letter-spacing: 0.05em;
}
.cg-zigzag-intro {
    max-width: 720px;
    margin-bottom: 2.5rem;
    margin-top: 2.5rem;
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.8;
}
.cg-gallery-section { padding-top: 2rem; }

/* Hide stats when using zigzag layout */
.cg-use-zigzag .cg-stats-strip { display: none; }
.cg-use-zigzag .cg-intro-card { display: none; }
.cg-use-zigzag .cg-features-wrap { display: none; }

/* ===== Stats strip (kept for fallback) ===== */
.cg-stats-strip {
    background: linear-gradient(90deg, #0a1628 0%, #1a365d 50%, #0d2847 100%);
    color: #fff;
    padding: 1.25rem 0;
    margin-bottom: 0;
    border-bottom: 3px solid rgba(255,255,255,0.1);
    box-shadow: 0 8px 24px rgba(0,31,63,0.2);
}

.cg-stats-strip .cg-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0.5rem 0.75rem;
}

.cg-stats-strip .cg-stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
    color: #86efac;
}

.cg-stats-strip .cg-stat-value {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin: 0;
    color: #fff;
}

.cg-stats-strip .cg-stat-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.75);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ===== Section blocks ===== */
.cg-section-block {
    padding: 3.5rem 0;
}

.cg-section-block:nth-child(even) {
    background: #fff;
}

.cg-section-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0a1628;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.cg-section-desc {
    font-size: 1.05rem;
    color: #475569;
    max-width: 640px;
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* ===== Intro card ===== */
.cg-intro-card {
    background: linear-gradient(135deg, #0a1628 0%, #1e3a5f 50%, #166534 100%);
    border-radius: 24px;
    padding: 2.5rem 2.5rem;
    color: #fff;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(10,22,40,0.25);
}

.cg-intro-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.06) 0%, transparent 70%);
    pointer-events: none;
}

.cg-intro-card .cg-intro-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: #86efac;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 0.4rem 0.9rem;
    border-radius: 100px;
    margin-bottom: 1.25rem;
}

.cg-intro-card .cg-intro-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
    line-height: 1.45;
    max-width: 600px;
}

.cg-intro-card .cg-intro-text {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.88);
    margin: 0;
    max-width: 580px;
}

/* ===== Mentorship feature cards ===== */
.cg-features-wrap {
    background: #fff;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 4px 32px rgba(0,31,63,0.08);
    border: 1px solid rgba(0,31,63,0.06);
    margin-bottom: 3rem;
}

.cg-features-intro {
    font-size: 1.05rem;
    color: #475569;
    line-height: 1.8;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e2e8f0;
}

.cg-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.cg-feature-card {
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.75rem 1.5rem;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.cg-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #16a34a, #15803d);
    transform: scaleY(0);
    transition: transform 0.25s ease;
}

.cg-feature-card:hover {
    background: #fff;
    box-shadow: 0 8px 28px rgba(0,31,63,0.1);
    border-color: rgba(22,163,74,0.25);
}

.cg-feature-card:hover::before {
    transform: scaleY(1);
}

.cg-feature-card .cg-feature-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #16a34a;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.cg-feature-card .cg-feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0a1628;
    margin: 0 0 0.4rem;
    line-height: 1.35;
}

.cg-feature-card .cg-feature-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
    line-height: 1.6;
}

/* ===== Image slots – hero image + gallery ===== */
.cg-hero-image-wrap {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,31,63,0.12);
    margin-bottom: 2rem;
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    aspect-ratio: 21/9;
    position: relative;
}

.cg-hero-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* When img fails to load, show placeholder via background on wrapper */
.cg-hero-image-wrap img[src=""],
.cg-hero-image-wrap img:not([src]) {
    opacity: 0;
}

.cg-gallery-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0a1628;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.cg-gallery-sub {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.cg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.cg-gallery-item {
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    aspect-ratio: 4/3;
    position: relative;
    box-shadow: 0 4px 16px rgba(0,31,63,0.08);
}

.cg-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Placeholder when image is missing or fails to load */
.cg-gallery-item .cg-img-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    background: linear-gradient(145deg, #e2e8f0 0%, #cbd5e1 100%);
    pointer-events: none;
}

.cg-gallery-item .cg-img-placeholder i {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.cg-gallery-item img.cg-loaded + .cg-img-placeholder {
    display: none;
}

/* Show placeholder if no img or img broken - use JS or just always show behind img; when img loads it covers */
.cg-gallery-item .cg-img-placeholder {
    z-index: 0;
}

.cg-gallery-item img {
    position: relative;
    z-index: 1;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
    .cg-section-block { padding: 2.5rem 0; }
    .cg-intro-card { padding: 2rem; }
    .cg-features-wrap { padding: 1.75rem; }
    .cg-features-grid { grid-template-columns: repeat(2, 1fr); }
    .cg-gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .cg-hero-image-wrap { aspect-ratio: 16/9; }
}

@media (max-width: 767px) {
    .cg-stats-strip .cg-stat-item { margin-bottom: 0.5rem; }
    .cg-intro-card { padding: 1.5rem; }
    .cg-intro-card .cg-intro-title { font-size: 1.2rem; }
    .cg-features-wrap { padding: 1.5rem; }
    .cg-features-grid { grid-template-columns: 1fr; }
    .cg-gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .cg-section-title { font-size: 1.5rem; }
}

@media (max-width: 576px) {
    .cg-hero-image-wrap { aspect-ratio: 4/3; }
}
