<?php
/**
 * Template Name: About Page
 */

get_header();
?>

<!-- Hero section -->
<section class="page-hero">
    <div class="hero-content">
        <h1><?php the_title(); ?></h1>
        <p><?php echo esc_html(get_theme_mod('about_subtitle', 'Get to know our passionate team')); ?></p>
    </div>
</section>

<!-- Team section -->
<section class="team-section">
    <div class="container">
        <div class="team-grid">
            <!-- Nejc -->
            <div class="team-member">
                <div class="member-image">
                    <img src="<?php echo esc_url(get_theme_mod('team_nejc_image', get_template_directory_uri() . '/images/nejc.webp')); ?>" 
                         alt="<?php echo esc_attr(get_theme_mod('team_nejc_name', 'Nejc Dovžan Kukič')); ?>">
                </div>
                <div class="member-info">
                    <h2 class="member-name"><?php echo esc_html(get_theme_mod('team_nejc_name', 'Nejc Dovžan Kukič')); ?></h2>
                    <h3 class="member-position"><?php echo esc_html(get_theme_mod('team_nejc_position', 'CEO')); ?></h3>
                    <div class="member-bio">
                        <p><?php echo wp_kses_post(get_theme_mod('team_nejc_bio', 'A visionary leader with a passion for innovation and growth. Nejc drives the company\'s strategy with precision and purpose — when not in the office, you\'ll find him exploring mountain trails.')); ?></p>
                    </div>
                </div>
            </div>

            <!-- Matic -->
            <div class="team-member">
                <div class="member-image">
                    <img src="<?php echo esc_url(get_theme_mod('team_matic_image', get_template_directory_uri() . '/images/matic.webp')); ?>" 
                         alt="<?php echo esc_attr(get_theme_mod('team_matic_name', 'Matic Snoj')); ?>">
                </div>
                <div class="member-info">
                    <h2 class="member-name"><?php echo esc_html(get_theme_mod('team_matic_name', 'Matic Snoj')); ?></h2>
                    <h3 class="member-position"><?php echo esc_html(get_theme_mod('team_matic_position', 'COO')); ?></h3>
                    <div class="member-bio">
                        <p><?php echo wp_kses_post(get_theme_mod('team_matic_bio', 'As the backbone of daily operations, Matic ensures everything runs smoothly behind the scenes. He\'s careful and detail-oriented and brings the same dedication to cycling in his free time.')); ?></p>
                    </div>
                </div>
            </div>

            <!-- Luka -->
            <div class="team-member">
                <div class="member-image">
                    <img src="<?php echo esc_url(get_theme_mod('team_luka_image', get_template_directory_uri() . '/images/luka.webp')); ?>" 
                         alt="<?php echo esc_attr(get_theme_mod('team_luka_name', 'Luka Dovžan Kukič')); ?>">
                </div>
                <div class="member-info">
                    <h2 class="member-name"><?php echo esc_html(get_theme_mod('team_luka_name', 'Luka Dovžan Kukič')); ?></h2>
                    <h3 class="member-position"><?php echo esc_html(get_theme_mod('team_luka_position', 'CFO')); ?></h3>
                    <div class="member-bio">
                        <p><?php echo wp_kses_post(get_theme_mod('team_luka_bio', 'Luka manages the company\'s financial strategy with focus and discipline. Reliable and analytical, he brings the same energy to both numbers and his love for cycling.')); ?></p>
                    </div>
                </div>
            </div>

            <!-- Jernej -->
            <div class="team-member">
                <div class="member-image">
                    <img src="<?php echo esc_url(get_theme_mod('team_jernej_image', get_template_directory_uri() . '/images/jernej.webp')); ?>" 
                         alt="<?php echo esc_attr(get_theme_mod('team_jernej_name', 'Jernej Antloga')); ?>">
                </div>
                <div class="member-info">
                    <h2 class="member-name"><?php echo esc_html(get_theme_mod('team_jernej_name', 'Jernej Antloga')); ?></h2>
                    <h3 class="member-position"><?php echo esc_html(get_theme_mod('team_jernej_position', 'Travel specialist')); ?></h3>
                    <div class="member-bio">
                        <p><?php echo wp_kses_post(get_theme_mod('team_jernej_bio', 'Friendly and knowledgeable, Jernej designs personalized trips with energy and enthusiasm. A history enthusiast, he brings stories to life through travel.')); ?></p>
                    </div>
                </div>
            </div>

            <!-- Kevin -->
            <div class="team-member">
                <div class="member-image">
                    <img src="<?php echo esc_url(get_theme_mod('team_kevin_image', get_template_directory_uri() . '/images/Kevin.webp')); ?>" 
                         alt="<?php echo esc_attr(get_theme_mod('team_kevin_name', 'Kevin Krajnc')); ?>">
                </div>
                <div class="member-info">
                    <h2 class="member-name"><?php echo esc_html(get_theme_mod('team_kevin_name', 'Kevin Krajnc')); ?></h2>
                    <h3 class="member-position"><?php echo esc_html(get_theme_mod('team_kevin_position', 'Travel specialist')); ?></h3>
                    <div class="member-bio">
                        <p><?php echo wp_kses_post(get_theme_mod('team_kevin_bio', 'Creative and detail-oriented, Kevin helps clients plan seamless, custom journeys. He\'s a road trip specialist known for his helpful nature and great communication skills.')); ?></p>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<style>
/* About Page Styles */
.page-hero {
    height: 40vh;
    background: linear-gradient(to top,
        rgba(0, 0, 0, 0.7) 0%,
        rgba(0, 0, 0, 0.4) 30%,
        rgba(0, 0, 0, 0) 100%
    ), var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 4rem;
}

.page-hero .hero-content {
    padding: 2rem;
    color: white;
}

.page-hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.page-hero p {
    font-size: 1.3rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    max-width: 800px;
    margin: 0 auto;
}

.team-section {
    padding: 80px 20px;
}

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

.team-grid {
    display: grid;
    gap: 60px;
    margin-top: 40px;
}

.team-member {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.team-member:nth-child(even) {
    flex-direction: row-reverse;
}

.member-image {
    flex: 0 0 300px;
}

.member-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    background-color: #eee;
}

.member-info {
    flex: 1;
}

.member-name {
    font-size: 32px;
    margin: 0 0 10px;
}

.member-position {
    font-size: 20px;
    color: #666;
    margin: 0 0 20px;
}

.member-bio {
    font-size: 16px;
    line-height: 1.6;
    color: #444;
}

@media (max-width: 768px) {
    .page-hero h1 {
        font-size: 2.5rem;
    }
    
    .page-hero p {
        font-size: 1.1rem;
    }
    
    .team-member,
    .team-member:nth-child(even) {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .member-image {
        flex: 0 0 auto;
        max-width: 250px;
        margin: 0 auto;
    }
}
</style>

<?php get_footer(); ?> 