/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 80px; /* Account for sticky header height */
}

:root {
    --video-aspect-ratio: 4 / 3;
    --video-height-from-width: 0.75; /* 3/4 ratio for height calculation */
}

body {
    font-family: 'Arial', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    line-height: 1.6;
    color: #333;
    background: linear-gradient(to right, #667eea 0%, #764ba2 100%);
}

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

/* Header and Navigation */
header {
    background: linear-gradient(to right, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo img {
    height: 60px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.nav-links a:hover {
    color: #ffd700;
}

/* Hero Section */
#hero {
    background: linear-gradient(to right, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffd700;
    color: #333;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255,215,0,0.3);
}

.youtube-icon {
    width: 20px;
    height: 20px;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,215,0,0.4);
}

/* Sections */
section {
    padding: 4rem 0;
}

section:nth-child(even) {
    background-color: white;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    color: #333;
}

/* About Section */
#about {
    background: white;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: #555;
}

.about-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.about-details span {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    color: #333;
}

/* Portfolio Section */
#portfolio {
    background: #f8f9fa;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.portfolio-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.portfolio-item:hover:not(.portfolio-item--expanded) {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.portfolio-item h3 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.portfolio-item p {
    color: #666;
    margin-bottom: 1rem;
}

.status {
    color: #999;
    font-style: italic;
}

.video-button {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
    transition: background 0.3s ease;
}

.video-button:hover {
    background: #764ba2;
}

/* Portfolio Video Expansion */
.portfolio-item--expanded {
    grid-column: 1 / -1;
    max-width: none;
    z-index: 100;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    width: fit-content;
    margin: 0 auto;
}

.portfolio-item--expanded .video-container {
    aspect-ratio: var(--video-aspect-ratio);
    margin: 1rem auto 0;
    position: relative;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    min-height: min(50vh, calc(60vw * var(--video-height-from-width)));
    max-height: min(75vh, calc(80vw * var(--video-height-from-width)));
}

.portfolio-item--expanded .video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.hide-video-btn {
    display: none;
}

.portfolio-item--expanded .hide-video-btn {
    display: inline-block;
}

.portfolio-item--expanded .video-link {
    display: none;
}

/* Testimonials Section */
#testimonials {
    background: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.testimonial-card {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.testimonial-content p {
    font-size: 1.2rem;
    font-style: italic;
    color: #555;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.testimonial-author span {
    color: #999;
    font-weight: 500;
    font-size: 0.9rem;
}

.trustpilot-widget-container {
    text-align: center;
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Contact Section */
#contact {
    background: #f8f9fa;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.contact-item {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateY(-3px);
}

.contact-item .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 1rem;
}

.contact-item strong {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.contact-item a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: #764ba2;
}


/* Footer */
footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px; /* Slightly smaller offset for mobile */
    }
    
    .nav-links {
        display: none;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 20px;
    }
    
    .about-details {
        flex-direction: column;
        gap: 1rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    /* Mobile portfolio expansion */
    .portfolio-item--expanded {
        text-align: left;
        padding: 2rem 2rem 0 2rem; /* Keep padding for text, remove bottom */
    }
    
    .portfolio-item--expanded .video-container {
        margin: 1rem -2rem 0; /* Negative margin to fill card width */
        border-radius: 0 0 10px 10px; /* Round only bottom corners to match card */
        min-height: min(45vh, calc((100vw - 40px) * var(--video-height-from-width))); /* Account for container padding only */
        max-height: min(65vh, calc((100vw - 40px) * var(--video-height-from-width)));
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-description {
        padding: 0 15px;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    /* Ultra mobile portfolio expansion */
    .portfolio-item--expanded {
        text-align: left;
        padding: 2rem 2rem 0 2rem; /* Keep padding for text, remove bottom */
    }
    
    .portfolio-item--expanded .video-container {
        margin: 1rem -2rem 0; /* Negative margin to fill card width */
        border-radius: 0 0 10px 10px; /* Round only bottom corners to match card */
        min-height: min(40vh, calc((100vw - 30px) * var(--video-height-from-width))); /* Account for container padding only */
        max-height: min(60vh, calc((100vw - 30px) * var(--video-height-from-width)));
    }
}