/*═══════════════════════════════════════════════════════════════════════
  TESTIMONIALS PAGE STYLES
═══════════════════════════════════════════════════════════════════════*/

/*─────────────────────────────────────────────────────────────────────
  ROOT VARIABLES (inherits from main theme)
─────────────────────────────────────────────────────────────────────*/
:root {
    --primary-blue: #0066cc;
    --dark-navy: #001f4d;
    --accent-orange: #ff6b35;
    --light-gray: #f5f5f5;
    --white: #ffffff;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #dddddd;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/*─────────────────────────────────────────────────────────────────────
  TESTIMONIALS HERO SECTION
─────────────────────────────────────────────────────────────────────*/
.testimonials-hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-navy) 100%);
    color: var(--white);
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.testimonials-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 184, 212, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.testimonials-hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.testimonials-hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

.testimonials-hero p {
    font-size: 1.25rem;
    opacity: 0.95;
    font-weight: 300;
}

@media (max-width: 768px) {
    .testimonials-hero {
        padding: 4rem 1.5rem;
    }

    .testimonials-hero h1 {
        font-size: 2.5rem;
    }

    .testimonials-hero p {
        font-size: 1rem;
    }
}

/*─────────────────────────────────────────────────────────────────────
  TESTIMONIALS SECTION
─────────────────────────────────────────────────────────────────────*/
.testimonials-section {
    padding: 5rem 2rem;
    background: var(--light-gray);
}

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

.testimonials-intro {
    text-align: center;
    margin-bottom: 3.5rem;
}

.testimonials-intro h2 {
    font-size: 2.5rem;
    color: var(--dark-navy);
    margin-bottom: 1rem;
    font-weight: 700;
}

.testimonials-intro p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/*─────────────────────────────────────────────────────────────────────
  FILTER BUTTONS
─────────────────────────────────────────────────────────────────────*/
.testimonials-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-blue);
    background: var(--white);
    color: var(--primary-blue);
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: capitalize;
}

.filter-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.filter-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .testimonials-filters {
        gap: 0.75rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/*─────────────────────────────────────────────────────────────────────
  VIEW TABS (Text/Video Toggle)
─────────────────────────────────────────────────────────────────────*/
.testimonials-view-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    border-bottom: 2px solid var(--border-color);
}

.view-tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: transparent;
    color: var(--text-light);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    text-transform: capitalize;
}

.view-tab-btn:hover {
    color: var(--primary-blue);
}

.view-tab-btn.active {
    color: var(--primary-blue);
    font-weight: 700;
}

.view-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 2px 2px 0 0;
}

@media (max-width: 768px) {
    .testimonials-view-tabs {
        gap: 0.3rem;
    }

    .view-tab-btn {
        padding: 0.50rem 1rem;
        font-size: 0.5rem;
    }
}

/*─────────────────────────────────────────────────────────────────────
  TESTIMONIALS GRID LAYOUT
─────────────────────────────────────────────────────────────────────*/
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Portrait gallery grid layout */
.testimonials-grid.image-view {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1200px) {
    .testimonials-grid.image-view {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .testimonials-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }

    .testimonials-grid.image-view {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid.image-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .testimonials-grid.image-view {
        grid-template-columns: 1fr;
    }
}

/*─────────────────────────────────────────────────────────────────────
  TESTIMONIAL CARD (Text)
─────────────────────────────────────────────────────────────────────*/
.testimonial-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease;
    display: block;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* Image cards don't transform on hover (handled by image-overlay) */
.testimonial-card.testimonial-image:hover {
    transform: none;
}

.testimonial-card.hidden-item {
    display: none;
}

.testimonial-card-inner {
    padding: 2rem;
}

/* Image cards have no padding */
.testimonial-card.testimonial-image .testimonial-card-inner {
    padding: 0;
}

/*─────────────────────────────────────────────────────────────────────
  TEXT TESTIMONIAL CONTENT
─────────────────────────────────────────────────────────────────────*/
.testimonial-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.testimonial-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-blue);
    flex-shrink: 0;
}

.testimonial-info h3 {
    font-size: 1.2rem;
    color: var(--dark-navy);
    margin: 0;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.testimonial-program {
    font-size: 0.9rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin: 0;
    margin-bottom: 0.25rem;
}

.testimonial-university {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    margin-bottom: 0.25rem;
}

.testimonial-country {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.testimonial-country i {
    margin-right: 0.25rem;
    color: var(--accent-orange);
}

/*─────────────────────────────────────────────────────────────────────
  IMAGE TESTIMONIAL CARD (Gallery Style)
─────────────────────────────────────────────────────────────────────*/
.testimonial-image {
    padding: 0;
    background: #fff;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
    cursor: pointer;
}

.testimonial-image:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.testimonial-image .testimonial-card-inner {
    padding: 0;
}

.image-testimonial-container {
    position: relative;
    width: 100%;
    aspect-ratio: 1/1;
    overflow: hidden;
    background: #000;
}

.testimonial-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-image:hover .testimonial-gallery-image {
    transform: scale(1.08);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 31, 77, 0.95) 0%, rgba(0, 31, 77, 0.5) 50%, transparent 100%);
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 1.25rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.testimonial-image:hover .image-overlay {
    opacity: 1;
}

.image-overlay-info {
    color: var(--white);
    width: 100%;
}

.image-overlay-info h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    margin-bottom: 0.3rem;
    color: var(--white);
}

.image-overlay-info p {
    font-size: 0.85rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

/*─────────────────────────────────────────────────────────────────────
  GOOGLE REVIEW TESTIMONIAL CARD
─────────────────────────────────────────────────────────────────────*/
.testimonial-google {
    padding: 0;
    background: #fff;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s ease;
    cursor: pointer;
}

.testimonial-google:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.testimonial-google .testimonial-card-inner {
    padding: 0;
}

.google-review-container {
    position: relative;
    width: 100%;
    aspect-ratio: auto;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
}

.google-review-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.testimonial-google:hover .google-review-image {
    transform: scale(1.03);
}

.testimonial-avatar-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-navy));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.8rem;
    font-weight: 700;
    flex-shrink: 0;
    border: 3px solid var(--primary-blue);
}

.testimonial-rating {
    margin-bottom: 1rem;
    display: flex;
    gap: 0.25rem;
}

.testimonial-rating i {
    color: #ffc107;
    font-size: 1rem;
}

.testimonial-text {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    text-align: justify;
}

/*─────────────────────────────────────────────────────────────────────
  VIDEO TESTIMONIAL CARD
─────────────────────────────────────────────────────────────────────*/
.testimonial-video {
    position: relative;
    overflow: hidden;
}

.testimonial-video .testimonial-card-inner {
    padding: 0;
}

.video-thumbnail-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    min-height: 350px;
    overflow: hidden;
    background: #000;
}

.video-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(0, 102, 204, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
}

.video-play-btn i {
    color: var(--white);
    font-size: 1.8rem;
    margin-left: 6px;
}

.testimonial-video:hover .video-play-btn {
    background: rgba(0, 102, 204, 1);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-testimonial-info {
    padding: 1.5rem;
    background: var(--white);
}

.video-testimonial-info h3 {
    font-size: 1.1rem;
    color: var(--dark-navy);
    margin: 0;
    margin-bottom: 0.25rem;
    font-weight: 700;
}

.video-program {
    font-size: 0.9rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin: 0;
    margin-bottom: 0.25rem;
}

.video-university {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    margin-bottom: 0.25rem;
}

.video-country {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
}

.video-country i {
    margin-right: 0.25rem;
    color: var(--accent-orange);
}

/*─────────────────────────────────────────────────────────────────────
  VIDEO MODAL
─────────────────────────────────────────────────────────────────────*/
.video-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    position: relative;
    max-width: 70%;
    max-height: 70vh;
    width: 100%;
    height: 100%;
    aspect-ratio: 16/9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}

#modal-video {
    width: 100%;
    height: 100%;
}

.modal-close {
    position: absolute;
    top: -45px;
    right: 0;
    font-size: 2rem;
    color: var(--white);
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1001;
    padding: 5px 10px;
}

.modal-close:hover {
    color: var(--primary-blue);
}

@media (max-width: 1024px) {
    .video-modal-content {
        max-width: 85%;
        max-height: 75vh;
    }
}

@media (max-width: 768px) {
    .video-modal-content {
        max-width: 95%;
        max-height: 60vh;
        aspect-ratio: auto;
    }
    
    .modal-close {
        top: -35px;
        font-size: 1.5rem;
    }
}

/*─────────────────────────────────────────────────────────────────────
  VIEW MORE BUTTON
─────────────────────────────────────────────────────────────────────*/
.view-more-container {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.view-more-btn {
    padding: 1rem 3rem;
    background: var(--primary-blue);
    color: var(--white);
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.view-more-btn:hover {
    background: var(--dark-navy);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.view-more-btn:active {
    transform: translateY(-1px);
}

/*─────────────────────────────────────────────────────────────────────
  RESPONSIVE DESIGN
─────────────────────────────────────────────────────────────────────*/
@media (max-width: 1024px) {
    .testimonials-section {
        padding: 4rem 1.5rem;
    }

    .testimonials-intro h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .testimonials-section {
        padding: 3rem 1rem;
    }

    .testimonials-intro {
        margin-bottom: 2rem;
    }

    .testimonials-intro h2 {
        font-size: 1.8rem;
    }

    .testimonials-intro p {
        font-size: 1rem;
    }

    .testimonial-card-inner {
        padding: 1.5rem;
    }

    .modal-close {
        top: 10px;
    }
}

/*─────────────────────────────────────────────────────────────────────
  HIDDEN ITEMS & VISIBILITY CONTROL
─────────────────────────────────────────────────────────────────────*/
.testimonial-card.hidden-item {
    display: none;
}

.testimonial-card.hidden-item.show {
    display: block;
}

/* Filter-based hiding */
.testimonial-card[style="display: none;"],
.testimonial-text.hidden-item ~ .testimonial-video.hidden-item {
    display: none !important;
}

/*─────────────────────────────────────────────────────────────────────
  PREMIUM FEATURES
─────────────────────────────────────────────────────────────────────*/

/* Premium card badge */
.testimonial-card.premium::before {
    content: '★ PREMIUM';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-orange);
    color: var(--white);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    z-index: 10;
}

/* Featured testimonial styling */
.testimonial-card.featured {
    grid-column: span 1;
    border: 2px solid var(--primary-blue);
}

@media (min-width: 1024px) {
    .testimonial-card.featured {
        grid-column: span 2;
    }
}

/* Hero testimonial (larger card) */
.testimonial-card.hero {
    grid-column: 1 / -1;
}

.testimonial-card.hero .testimonial-card-inner {
    padding: 3rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .testimonial-card.hero .testimonial-card-inner {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .testimonial-card.featured,
    .testimonial-card.hero {
        grid-column: 1;
    }
}
