/**
 * The Wealth Engineers - Professional Styles
 * Modern, clean design system
 */

:root {
    --primary-navy: #1e3a5f;
    --secondary-orange: #1f1955;
    --accent-orange: #fb923c;
    --light-gray: #f8fafc;
    --medium-gray: #64748b;
    --dark-gray: #334155;
    --charcoal: #1e293b;
}

/* Global Styles */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', 'Segoe UI', 'Roboto', Arial, sans-serif;
}

/* Utility Classes */
.text-primary { color: var(--primary-navy); }
.text-secondary { color: var(--secondary-orange); }
.text-dark-gray { color: var(--dark-gray); }
.text-medium-gray { color: var(--medium-gray); }
.bg-primary { background-color: var(--primary-navy); }
.bg-secondary { background-color: var(--secondary-orange); }
.bg-light-gray { background-color: var(--light-gray); }
.bg-charcoal { background-color: var(--charcoal); }
.border-secondary { border-color: var(--secondary-orange); }

/* Header Styles */
.header-modern {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-modern.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Navigation */
.nav-link {
    position: relative;
    font-weight: 500;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-navy);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile Navigation */
#mobile-menu-toggle {
    z-index: 60;
}

#mobile-menu-toggle .hamburger-open,
#mobile-menu-toggle .hamburger-close {
    transition: opacity 0.2s ease;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 55;
    padding-top: 80px;
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu-content {
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    color: var(--dark-gray);
    font-weight: 500;
    font-size: 1rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.mobile-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-navy);
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
    background: var(--light-gray);
    color: var(--primary-navy);
    transform: translateX(4px);
}

.mobile-menu-item:hover::before,
.mobile-menu-item.text-primary::before {
    transform: scaleY(1);
}

.mobile-menu-item.text-primary {
    background: rgba(30, 58, 95, 0.08);
    color: var(--primary-navy);
    font-weight: 600;
}

.mobile-menu-item i {
    font-size: 1.125rem;
    width: 24px;
    text-align: center;
}

.mobile-menu-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-navy);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-left: 1.25rem;
    margin-right: 1.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.2);
}

.mobile-menu-cta:hover,
.mobile-menu-cta:active {
    background: var(--charcoal);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 58, 95, 0.3);
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 50;
    backdrop-filter: blur(2px);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Hide mobile menu on desktop */
@media (min-width: 1024px) {
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
    overflow: hidden;
}

/* Mobile navigation removed: styles previously targeting .mobile-menu, #mobile-menu-toggle, and .mobile-menu-overlay were removed. */

/* Hero Sections */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--charcoal) 100%);
}

.hero-bg {
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(23, 45, 74, 0.85), rgba(16, 32, 52, 0.85));
}

/* Cards */
.professional-card {
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.professional-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Badges */
.badge {
    background: linear-gradient(135deg, var(--accent-orange), #f97316);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 600;
    font-size: 0.875rem;
    display: inline-block;
}

/* Buttons */
.hover-bg-secondary:hover { 
    background-color: var(--accent-orange); 
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--accent-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: scale(1.1);
}

/* Section Divider */
.section-divider {
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    height: 1px;
    margin: 2rem 0;
}

/* Responsive Images */
img, video {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    word-wrap: break-word;
}

/* Line Clamp Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading Animation */
@keyframes spin {
    to { transform: rotate(360deg); }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Responsive Typography */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
}

@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    h1 {
        font-size: 4rem;
    }
}

/* Grid Responsive */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* Podcast Sections Styles */

/* Featured Episode Styles */
.featured-episode-card {
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.featured-episode-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.featured-episode-image {
    position: relative;
    overflow: hidden;
}

.featured-episode-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.8), rgba(31, 25, 85, 0.6));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.featured-episode-card:hover .featured-episode-image::before {
    opacity: 1;
}

.featured-episode-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
}

.featured-episode-card:hover .featured-episode-play {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Episode Filter Styles */
.filter-input-focus:focus-within {
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 2px solid transparent;
    background: #f8fafc;
    color: #64748b;
}

.tag-pill:hover {
    background: #e2e8f0;
    color: #334155;
}

.tag-pill.active {
    background: linear-gradient(135deg, var(--primary-navy), var(--secondary-orange));
    color: white;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.tag-pill-clear {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-weight: 700;
}

.tag-pill-clear:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    transform: scale(1.05);
}

.tag-pill i {
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

/* Episode Cards - Now matching property card style */
.episode-card {
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.episode-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent-orange), var(--primary-navy));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.episode-card:hover::before {
    transform: scaleY(1);
}

.episode-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--accent-orange);
}

/* Podcast cards now use professional-card class from properties */

.episode-number {
    background: var(--accent-orange);
    color: white;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.episode-number-badge {
    background: var(--primary-navy);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
    backdrop-filter: blur(8px);
}

/* Play Episode Button - matches property view case study button style */
.play-episode-btn {
    display: inline-flex;
    align-items: center;
    color: var(--primary-navy);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    font-size: 1rem;
}

.play-episode-btn:hover {
    color: var(--accent-orange);
}

.play-episode-btn i {
    transition: all 0.3s ease;
}

.play-episode-btn:hover i.fa-arrow-right {
    transform: translateX(4px);
}

.play-episode-btn:hover i.fa-play {
    transform: scale(1.1);
}

.play-episode-btn:active {
    transform: scale(0.98);
}

/* Newsletter Form Styles */
#newsletter-form input:focus {
    transform: scale(1.02);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

#newsletter-form button {
    box-shadow: 0 10px 25px rgba(251, 146, 60, 0.3);
}

#newsletter-form button:hover {
    box-shadow: 0 15px 35px rgba(251, 146, 60, 0.4);
}

/* Audio Player Enhancements */
audio::-webkit-media-controls-panel {
    background-color: #f8fafc;
}

audio {
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Filter Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-down {
    animation: slideDown 0.3s ease-out;
}

/* Loading State for Episodes */
.episode-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Testimonial Carousel Styles */
#testimonial-carousel {
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}

#testimonial-carousel:active {
    cursor: grabbing;
}

#testimonial-carousel::-webkit-scrollbar {
    display: none;
}

#testimonial-carousel .professional-card {
    user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
}

/* Testimonial Navigation Buttons - Fix positioning */
#testimonial-left,
#testimonial-right {
    transform: translateY(-50%);
    transition: background-color 0.3s ease, color 0.3s ease;
}

#testimonial-left:hover,
#testimonial-right:hover {
    transform: translateY(-50%) !important;
}

/* Enhanced Section Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes slide-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--secondary-orange) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Process Section Enhancements */
.process-step {
    animation: slide-in-up 0.6s ease-out forwards;
    opacity: 0;
}

.process-step:nth-child(1) { animation-delay: 0.1s; }
.process-step:nth-child(2) { animation-delay: 0.2s; }
.process-step:nth-child(3) { animation-delay: 0.3s; }
.process-step:nth-child(4) { animation-delay: 0.4s; }
.process-step:nth-child(5) { animation-delay: 0.5s; }

/* Icon Glow Effects */
.icon-glow {
    position: relative;
}

.icon-glow::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: inherit;
    filter: blur(20px);
    opacity: 0.5;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.icon-glow:hover::after {
    opacity: 0.8;
}

/* Card Hover Effects Enhanced */
.professional-card {
    position: relative;
    overflow: hidden;
}

.professional-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.professional-card:hover::before {
    left: 100%;
}

/* Stat Counter Animation */
@keyframes counter-pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.stat-number:hover {
    animation: counter-pop 0.3s ease;
}

/* Badge Styles */
.badge-premium {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.1) 0%, rgba(251, 146, 60, 0.1) 100%);
    border: 1px solid rgba(30, 58, 95, 0.2);
    backdrop-filter: blur(10px);
}

/* Enhanced Button Hover Effects */
button:not(#testimonial-left):not(#testimonial-right):hover, 
a.inline-flex:hover {
    transform: translateY(-2px);
    transition: all 0.3s ease;
}

button:not(#testimonial-left):not(#testimonial-right):active, 
a.inline-flex:active {
    transform: translateY(0);
}

/* Floating Animation for Decorative Elements */
.float-animation {
    animation: float 6s ease-in-out infinite;
}

/* Benefit Card Gradient Borders */
.benefit-card-1 { border-left: 4px solid var(--primary-navy); }
.benefit-card-2 { border-left: 4px solid var(--accent-orange); }
.benefit-card-3 { border-left: 4px solid #10b981; }
.benefit-card-4 { border-left: 4px solid #8b5cf6; }

/* Enhanced Shadow on Scroll */
.shadow-scroll {
    transition: box-shadow 0.3s ease;
}

.shadow-scroll:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Input Focus Styles */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

/* Gradient Backgrounds */
.gradient-bg {
    background: linear-gradient(135deg, var(--primary-navy) 0%, var(--charcoal) 100%);
}

/* Professional Card Enhancements */
.professional-card {
    background: white;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.professional-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Stats Animation */
@keyframes countUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-count {
    animation: countUp 0.6s ease-out;
}

/* Responsive Podcast Adjustments */
@media (max-width: 768px) {
    .featured-episode-card {
        flex-direction: column;
    }
    
    .episode-card {
        padding: 1rem;
    }
    
    #episode-filters .flex {
        flex-direction: column;
    }
}

/* Podcast Background Image Effects */
#podcast-embed-container {
    transition: all 0.3s ease;
}

#podcast-bg-image {
    pointer-events: none;
    z-index: 0;
}

#podcast-bg-image-inner {
    width: 100%;
    height: 100%;
}

#podcast-bg-pattern {
    z-index: 0;
}

/* Make sure iframe and content stay above background */
#podcast-embed-container .relative.z-10 {
    position: relative;
    z-index: 10;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Loading States */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Icon Animations */
.fa-star {
    transition: all 0.3s ease;
}

.fa-star:hover {
    transform: scale(1.2);
}

/* Responsive Grid Adjustments */
@media (max-width: 640px) {
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: 1fr;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Property Stats Responsive */
@media (max-width: 768px) {
    .grid.grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}
