/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh; /* Fallback */
    height: calc(var(--vh, 1vh) * 100);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, 
                rgba(0, 0, 0, 0) 0%, 
                rgba(100, 181, 246, 0.25) 50%, 
                rgba(255, 236, 179, 0.3) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
    }

h1 {
    font-size: 4.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    letter-spacing: 1px;
}

h2 {
    font-size: 1.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background-color: #2196F3;
    color: white;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.4), 
                0 0 20px rgba(255, 236, 179, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(33, 150, 243, 0.6), 
                0 0 30px rgba(255, 236, 179, 0.7);
}

.btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}


.my-story {
    position: relative;
    padding: 60px 0 80px;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Creates a parallax-like effect */
    overflow: hidden;
}

/* Modern browsers with WebP support */
@supports (background-image: -webkit-image-set(url('test.webp') 1x)) {
    .my-story {
        background-image: -webkit-image-set(
            url('../responsive_images/section-bg-small.webp') 1x,
            url('../responsive_images/section-bg-medium.webp') 1.5x,
            url('../responsive_images/section-bg-large.webp') 2x
        );
        background-image: image-set(
            url('../responsive_images/section-bg-small.webp') 1x,
            url('../responsive_images/section-bg-medium.webp') 1.5x,
            url('../responsive_images/section-bg-large.webp') 2x
        );
    }
}

/* Fallback for older browsers */
.my-story {
    background-image: url('../responsive_images/section-bg-large.jpg');
}

/* For high DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) { 
    .my-story {
        background-image: url('../responsive_images/section-bg-large.jpg');
    }
}

.my-story::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(100, 181, 246, 0.6), rgba(255, 236, 179, 0.7)); /* Gradient overlay */
    z-index: 0;
}

.story-container {
    position: relative; /* Ensure content is above the overlay */
    z-index: 1;
    display: flex;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 40px;
    align-items: flex-start;
    box-sizing: border-box;
}

.story-column {
    flex: 1;
    min-width: 0; /* Prevents flex items from overflowing container */
}

.story-image-column {
    flex-basis: 45%;
    position: sticky;
    top: 40px;
    align-self: flex-start;
}

.image-frame {
    border: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    overflow: hidden;
    line-height: 0; /* remove bottom space from img */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-frame:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.story-text-column {
    flex-basis: 55%;
    padding-bottom: 20px;
}

.story-text-column h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0 0 25px 0;
    line-height: 1.2;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.story-text-column .story-intro {
    font-size: 1.75rem;
    line-height: 1.7;
    color: #333;
    margin-bottom: 30px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-story-toggle {
    background-color: transparent;
    color: #2196F3;
    border: 2px solid #2196F3;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    margin-bottom: 30px;
}

.btn-story-toggle:hover {
    background-color: #2196F3;
    color: white;
}

.story-full-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.7s ease-in-out, opacity 0.5s ease-in-out;
    opacity: 0;
    border-top: 1px solid #e0e0e0;
    padding-top: 0;
    margin-top: 0;
}

.story-full-content.expanded {
    max-height: 5000px; /* Adjust if content is longer */
    opacity: 1;
    padding-top: 30px;
    margin-top: 30px;
}

.story-full-content h3 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #34495e;
    margin-top: 25px;
    margin-bottom: 15px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.story-full-content h3:first-child {
    margin-top: 0;
}

.story-full-content p {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 20px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.story-full-content strong {
    color: #2c3e50;
    font-weight: 600;
}


/* Responsive Styles */
@media (max-width: 1024px) {
    .story-container {
        padding: 0 30px;
        gap: 30px;
    }
    
    .story-text-column h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .my-story {
        padding: 40px 0 60px;
    }
    
    .story-container {
        flex-direction: column;
        gap: 30px;
        padding: 0 20px;
    }

    .story-image-column {
        position: static;
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .story-text-column {
        width: 100%;
    }
    
    .story-text-column h2 {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .story-text-column .story-intro {
        font-size: 1.5rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .my-story {
        padding: 30px 0 50px;
    }
    
    .story-container {
        padding: 0 15px;
        gap: 25px;
    }
    
    .story-text-column h2 {
        font-size: 1.8rem;
        margin-bottom: 18px;
    }
    
    .story-text-column .story-intro {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    
    .story-full-content h3 {
        font-size: 1.3rem;
        margin: 20px 0 10px;
    }
    
    .story-full-content p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    .btn-story-toggle {
        width: 100%;
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 3.5rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        padding: 12px 28px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    h2 {
        font-size: 1.25rem;
        margin-bottom: 30px;
    }
    
    .hero-content {
        padding: 0 15px;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}

/* iPhone SE and other small devices */
@media (max-width: 375px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
}
