/* ========================================
   ASYMMETRIC LAYOUTS
   Unique Layout Patterns for Differentiation
   ======================================== */

/* ==================== ZIGZAG LAYOUT ==================== */
/* Alternating Image-Text Layout for "Why Choose Us" */

.zigzag-container {
    max-width: 1200px;
    margin: 0 auto;
}

.zigzag-row {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 5rem;
    position: relative;
}

.zigzag-row:last-child {
    margin-bottom: 0;
}

/* Reverse layout for even rows */
.zigzag-row:nth-child(even) {
    flex-direction: row-reverse;
}

.zigzag-image {
    flex: 0 0 45%;
    position: relative;
}

.zigzag-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.zigzag-image:hover img {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* Decorative element */
.zigzag-image::before {
    content: "";
    position: absolute;
    top: -20px;
    left: -20px;
    right: 20px;
    bottom: 20px;
    background: var(--gradient-teal);
    border-radius: var(--radius-lg);
    z-index: -1;
    opacity: 0.2;
}

.zigzag-row:nth-child(even) .zigzag-image::before {
    left: 20px;
    right: -20px;
}

.zigzag-content {
    flex: 0 0 55%;
}

.zigzag-badge {
    display: inline-block;
    background: var(--gradient-purple);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.zigzag-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.3;
}

.zigzag-description {
    font-size: 1.05rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.zigzag-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zigzag-features li {
    padding: 0.75rem 0;
    font-size: 1rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.zigzag-features li i {
    color: var(--success-color);
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ==================== VARIED GRID PATTERN ==================== */
/* 2-1-2 Asymmetric Course Grid */

.varied-grid {
    display: grid;
    gap: 2rem;
}

/* Default 3-column */
.varied-grid-3col {
    grid-template-columns: repeat(3, 1fr);
}

/* 2-1-2 Pattern for Courses */
.varied-grid-2-1-2 {
    grid-template-columns: repeat(2, 1fr);
}

.varied-grid-2-1-2 .grid-item:nth-child(3) {
    grid-column: span 2;
    max-width: 600px;
    margin: 0 auto;
}

/* Featured Item Styling */
.grid-item-featured {
    background: linear-gradient(
        135deg,
        rgba(0, 107, 125, 0.05),
        rgba(91, 44, 111, 0.05)
    );
    border: 2px solid var(--primary-color);
    position: relative;
}

.grid-item-featured::before {
    content: "FEATURED";
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gradient-gold);
    color: var(--text-dark);
    padding: 0.4rem 0.9rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.75rem;
    z-index: 2;
}

/* ==================== MASONRY GRID ==================== */
/* Pinterest-style Testimonials Layout */

.masonry-grid {
    column-count: 3;
    column-gap: 2rem;
}

.masonry-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    display: inline-block;
    width: 100%;
}

.masonry-item-tall {
    /* For content with more text */
}

.masonry-item-short {
    /* For content with less text */
}

/* ==================== OFFSET GRID ==================== */
/* Staggered Card Layout */

.offset-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.offset-grid .grid-item:nth-child(even) {
    margin-top: 3rem;
}

/* ==================== DIAGONAL SECTION ==================== */
/* Angled Section Transitions */

.diagonal-section {
    position: relative;
    padding: 6rem 0;
}

.diagonal-section::before {
    content: "";
    position: absolute;
    top: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: inherit;
    transform: skewY(-2deg);
    transform-origin: top left;
}

.diagonal-section::after {
    content: "";
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    height: 100px;
    background: inherit;
    transform: skewY(-2deg);
    transform-origin: bottom right;
}

/* ==================== RESPONSIVE DESIGN ==================== */

@media (max-width: 992px) {
    /* Zigzag becomes vertical */
    .zigzag-row,
    .zigzag-row:nth-child(even) {
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .zigzag-image,
    .zigzag-content {
        flex: 1 1 100%;
    }

    .zigzag-image img {
        height: 300px;
    }

    /* Varied grid becomes 2-column */
    .varied-grid-3col,
    .varied-grid-2-1-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .varied-grid-2-1-2 .grid-item:nth-child(3) {
        grid-column: span 2;
    }

    /* Masonry becomes 2-column */
    .masonry-grid {
        column-count: 2;
        column-gap: 1.5rem;
    }

    /* Offset removed */
    .offset-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .offset-grid .grid-item:nth-child(even) {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .zigzag-title {
        font-size: 1.6rem;
    }

    .zigzag-description {
        font-size: 1rem;
    }

    /* All grids become single column */
    .varied-grid-3col,
    .varied-grid-2-1-2,
    .offset-grid {
        grid-template-columns: 1fr;
    }

    .varied-grid-2-1-2 .grid-item:nth-child(3) {
        grid-column: span 1;
    }

    /* Masonry becomes single column */
    .masonry-grid {
        column-count: 1;
    }

    .diagonal-section::before,
    .diagonal-section::after {
        display: none;
    }
}

/* ==================== UTILITY CLASSES ==================== */

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

@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center;
    }
}

.mb-responsive {
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .mb-responsive {
        margin-bottom: 0;
    }
}
