/*
 * MailCommerce AI Landing Page Styles
 * A modern, clean design for an AI email marketing platform
 */

/* ===== Base Styles ===== */
:root {
    /* Color Variables */
    --primary: #FF6B6B;
    --primary-dark: #FF5252;
    --primary-light: #FF9E9E;
    --secondary: #4ECDC4;
    --accent: #FFD166;
    --dark: #2D3748;
    --dark-light: #4A5568;
    --light: #F7FAFC;
    --light-gray: #E2E8F0;
    --medium-gray: #A0AEC0;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;

    /* Typography */
    --body-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-xxl: 3rem;
    --spacing-xxxl: 5rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
}

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

html {
    /* Remove or comment out this line */
    /* scroll-behavior: smooth; */
}

body {
    font-family: var(--body-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--dark);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

section {
    padding: var(--spacing-xxl) 0;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--spacing-xxl);
}

.section-header h2 {
    margin-bottom: var(--spacing-sm);
}

.section-header p {
    font-size: 1.125rem;
    color: var(--dark-light);
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

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

.btn-secondary {
    background-color: var(--light);
    color: var (--dark);
    border: 1px solid var(--light-gray);
}

.btn-secondary:hover {
    background-color: var(--light-gray);
    color: var(--dark);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

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

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

.btn i {
    margin-left: var(--spacing-sm);
}

/* ===== Header & Navigation ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    padding: var(--spacing-md) 0;
    transition: all var(--transition-normal);
}

.header.scrolled {
    padding: var(--spacing-sm) 0;
    box-shadow: var(--shadow-md);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
}

.logo span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    gap: var(--spacing-xl);
}

.nav-link {
    color: var(--dark);
    font-weight: 500;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition-normal);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-buttons {
    display: flex;
    gap: var(--spacing-md);
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all var(--transition-normal);
    background-color: var(--dark);
}

/* Mobile Menu Styles */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    z-index: 999;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu .nav-menu {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
}

.mobile-menu .nav-menu li {
    text-align: center;
}

.mobile-menu .nav-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu .nav-link {
    font-size: 18px;
    display: block;
    padding: 10px;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

body.no-scroll {
    overflow: hidden;
}

/* ===== Hero Section ===== */
.hero {
    padding: calc(var(--spacing-xxxl) * 2) 0 var(--spacing-xxxl);
    background: linear-gradient(135deg, #FFF5F5 0%, #FFEBEB 100%);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    align-items: center;
}

.hero-content {
    z-index: 1;
}

.hero h1 {
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
    background: linear-gradient(to right, var(--dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.hero-title-main {
    font-size: 2.5rem;
    line-height: 1.2;
}

.hero-title-sub {
    font-size: 2.5rem;
}

.hero p {
    font-size: 1.25rem;
    color: var(--dark-light);
    margin-bottom: var(--spacing-lg);
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.hero-stats {
    display: flex;
    gap: var(--spacing-xl);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var (--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--dark-light);
}

.hero-image {
    position: relative;
    z-index: 1;
    aspect-ratio: 16/9; /* Maintain consistent aspect ratio */
    max-width: 600px; /* Control maximum width */
    width: 100%;
    margin: 0 auto;
    height: 600px; /* Double the previous height */
}

.hero-image img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transform: perspective(600px) rotateY(-5deg) rotateX(5deg);
    transition: all var(--transition-slow), opacity 0.6s ease-in-out;
    width: 100%;
    height: 100%;
    object-fit: contain; /* Change to contain to preserve image aspect ratio */
    max-height: 600px; /* Double the previous max-height */
}

.hero-img {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transform: perspective(600px) rotateY(-5deg) rotateX(5deg);
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-img.active {
    opacity: 1;
}

/* ===== Features Section ===== */
.features {
    background-color: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    background-color: white;
    border-radius: var (--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--light-gray);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background-color: var(--primary-light);
    color: var (--primary-dark);
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
}

.feature-card h3 {
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    color: var(--dark-light);
    margin-bottom: 0;
}

/* ===== How It Works Section ===== */
.how-it-works {
    background-color: transparent;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    color: white;
    padding: var(--spacing-xxxl) 0;
}

#how-it-works-bg {
    position: relative;
    isolation: isolate;
}

#how-it-works-bg canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.how-it-works .section-header {
    margin-bottom: var(--spacing-xxxl);
}

.how-it-works .section-header h2 {
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 2.5rem;
}

.how-it-works .section-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-top: var(--spacing-md);
}

.steps {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
}

.step {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    gap: var(--spacing-xl);
    align-items: flex-start;
    transform: translateZ(0);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
}

.step:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.15);
}

.step-number {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.4);
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.step-content {
    flex: 1;
}

.step-content h3 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.step-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
}

@media (max-width: 768px) {
    .step {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-lg);
    }

    .step-number {
        margin: 0 auto var(--spacing-md);
    }
}

/* ===== Pricing Section ===== */
.pricing {
    background-color: white;
}

.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xxl);
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--light-gray);
    transition: var(--transition-normal);
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: var(--transition-normal);
}

input:checked + .slider {
    background-color: var(--primary);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.discount {
    background-color: var(--success);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: var(--spacing-sm);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.pricing-card {
    background-color: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--light-gray);
    position: relative;
}

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

.popular {
    border-color: var(--primary);
    transform: scale(1.05);
}

.popular:hover {
    transform: scale(1.05) translateY(-5px);
}

.popular-tag {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--primary);
    color: white;
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.75rem;
    font-weight: 600;
    border-bottom-left-radius: var(--radius-md);
}

.pricing-header {
    padding: var(--spacing-xl);
    text-align: center;
    border-bottom: 1px solid var(--light-gray);
}

.pricing-header h3 {
    margin-bottom: var(--spacing-sm);
}

.price {
    margin-bottom: var(--spacing-md);
}

.currency {
    font-size: 1.5rem;
    font-weight: 700;
    vertical-align: top;
    line-height: 1;
}

.amount {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.period {
    font-size: 0.875rem;
    color: var(--medium-gray);
}

.pricing-features {
    padding: var(--spacing-xl);
}

.pricing-features ul {
    margin-bottom: 0;
}

.pricing-features li {
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
}

.pricing-features li:last-child {
    margin-bottom: 0;
}

.pricing-features i {
    color: var(--success);
    margin-right: var(--spacing-sm);
}

.pricing-cta {
    padding: var(--spacing-xl);
    border-top: 1px solid var(--light-gray);
}

/* ===== Testimonials Section ===== */
.testimonials {
    background-color: var(--light);
}

.testimonial-slider {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
}

.testimonial-card {
    background-color: white;
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    border: 1px solid var(--light-gray);
}

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

.testimonial-content {
    margin-bottom: var(--spacing-lg);
}

.testimonial-content p {
    font-style: italic;
    color: var(--dark);
    margin-bottom: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.testimonial-author img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 0;
    font-size: 1rem;
}

.author-info p {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var (--medium-gray);
}

.testimonial-logos {
    text-align: center;
}

.logo-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: var (--spacing-xxl);
}

.logo-grid img {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all var(--transition-normal);
}

.logo-grid img:hover {
    filter: grayscale(0);
    opacity: 1;
}

/* ===== FAQ Section ===== */
.faq {
    background-color: white;
}

.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var (--spacing-md);
}

.faq-item {
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.faq-item:hover {
    border-color: var(--primary-light);
}

.faq-question {
    padding: var(--spacing-lg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
}

.faq-question h3 {
    margin-bottom: 0;
    font-size: 1.125rem;
}

.faq-toggle {
    color: var(--primary);
    transition: all var(--transition-normal);
}

.faq-answer {
    padding: 0 var(--spacing-lg) var(--spacing-lg);
    display: none;
}

.faq-answer p {
    margin-bottom: 0;
    color: var(--dark-light);
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-item.active .faq-answer {
    display: block;
}

/* ===== CTA Section ===== */
.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    isolation: isolate; /* Add this line */
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta h2 {
    color: white;
    margin-bottom: var(--spacing-md);
}

.cta p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
}

.cta .btn-primary {
    background-color: white;
    color: var(--primary);
}

.cta .btn-primary:hover {
    background-color: var(--light);
    color: var(--primary-dark);
}

.cta .btn-outline {
    border-color: white;
    color: white;
}

.cta .btn-outline:hover {
    background-color: white;
    color: var(--primary);
}

/* ===== Footer ===== */
.footer {
    background-color: var(--dark);
    color: white;
    padding: var(--spacing-xxl) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xxl);
    align-items: start;
}

.footer-logo {
    margin-top: var(--spacing-lg); /* Match the margin-top of other column headers */
    margin-bottom: var(--spacing-lg);
}

.footer-logo a {
    display: inline-block;
    color: unset;
    font-size: unset;
    font-weight: unset;
}

.footer-logo span {
    color: var(--primary-light);
}

.footer-column p {
    color: var(--medium-gray);
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-column ul a {
    color: var(--medium-gray);
    transition: all var(--transition-fast);
    opacity: 0.9;
}

.footer-column ul a:hover {
    color: white;
    padding-left: var(--spacing-sm);
    opacity: 1;
}

.footer-column h3 {
    margin-top: var(--spacing-lg); /* Add this line to match logo spacing */
    color: white;
    font-size: 1.125rem;
    margin-bottom: var(--spacing-lg);
    opacity: 0.9;
}

.footer-column:first-child h3 {
    margin-top: 0; /* Reset margin for first column */
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.newsletter-form {
    display: flex;
    gap: var(--spacing-sm);
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.newsletter-form input::placeholder {
    color: var(--medium-gray);
}

.newsletter-form button {
    padding: 0.75rem 1rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    margin-bottom: 0;
    color: var(--medium-gray);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a {
    color: var(--medium-gray);
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: white;
}

/* ===== Responsive Styles ===== */
@media (max-width: 992px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-image {
        margin-top: var(--spacing-xl);
        order: 2;
    }

    .pricing-card.popular {
        transform: scale(1);
    }

    .pricing-card.popular:hover {
        transform: translateY(-5px);
    }
}

@media (max-width: 768px) {
    .nav-menu, .nav-buttons {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .hero-cta {
        flex-direction: column;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--spacing-md);
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* Mobile Optimizations */
@media screen and (max-width: 768px) {
    /* Container padding adjustment */
    .container {
        padding: 0 20px;
    }

    /* Hero Section Mobile */
    .hero {
        padding: 100px 0 40px; /* Adjusted top padding */
        text-align: center;
        overflow: hidden;
    }

    .hero .container {
        padding: 0 20px;
        display: flex;
        flex-direction: column;
    }

    .hero-content {
        width: 100%;
        margin-bottom: 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero h1 {
        font-size: 32px;
        line-height: 1.3;
        margin-bottom: 20px;
        width: 100%;
    }

    .hero-title-main,
    .hero-title-sub {
        display: block;
        width: 100%;
        text-align: center;
    }

    .hero-content p {
        font-size: 16px;
        line-height: 1.6;
        margin: 20px auto;
        max-width: 100%;
        padding: 0 15px;
    }

    .hero-cta {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 280px; /* Reduced from 300px */
        margin: 30px auto;
    }

    .hero-stats {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-top: 30px;
        padding: 0 15px;
    }

    .stat {
        width: 100%;
        text-align: center;
        padding: 15px 10px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: var(--radius-md);
    }

    .hero-image {
        width: 100%;
        height: auto;
        margin: 20px auto 0;
        padding: 0;
        max-height: 400px; /* Control maximum height on mobile */
        position: relative;
    }

    .hero-img {
        position: relative;
        width: 100%;
        height: auto;
        max-width: 300px; /* Control maximum width */
        margin: 0 auto;
        border-radius: 12px;
        transform: perspective(600px) rotateY(0) rotateX(0); /* Remove 3D effect on mobile */
    }

    .hero-img.active {
        display: block;
        margin: 0 auto;
    }

    /* Adjust button sizes for better mobile experience */
    .btn-large {
        padding: 12px 24px;
        font-size: 16px;
        width: 100%;
    }
}

/* Additional mobile tweaks for smaller screens */
@media screen and (max-width: 480px) {
    .hero-stats {
        grid-template-columns: 1fr;  /* Stack stats vertically on very small screens */
    }

    .stat-number {
        font-size: 28px;
    }

    .hero h1 {
        font-size: 28px;
    }
}

@media screen and (max-width: 768px) {
    /* Container padding adjustment */
    .container {
        padding: 0 20px;
    }

    /* Hero Section Mobile */
    .hero {
        padding: 60px 0 40px;
        text-align: center;
    }

    .hero-content {
        width: 100%;
        margin-bottom: 40px;
    }

    .hero h1 {
        font-size: 32px;
        line-height: 1.3;
    }

    .hero-title-main,
    .hero-title-sub {
        display: block;
    }

    .hero-content p {
        font-size: 16px;
        line-height: 1.6;
        margin: 20px auto;
        max-width: 90%;
    }

    .hero-cta {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px;
        margin: 30px auto;
    }

    .hero-cta .btn {
        width: 100%;
        text-align: center;
    }

    .hero-stats {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
        margin-top: 30px;
    }

    .stat {
        width: calc(50% - 20px);
        text-align: center;
        padding: 15px;
    }

    .hero-image {
        width: 100%;
        margin-top: 40px;
        padding: 0 20px;
    }

    .hero-img {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        border-radius: 12px;
    }

    /* Features Section Mobile */
    .features {
        padding: 60px 0;
    }

    .section-header {
        margin-bottom: 40px;
        text-align: center;
    }

    .section-header h2 {
        font-size: 28px;
        line-height: 1.3;
        margin-bottom: 15px;
    }

    .section-header p {
        font-size: 16px;
        line-height: 1.6;
        max-width: 90%;
        margin: 0 auto;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 10px;
    }

    .feature-card {
        padding: 25px 20px;
        text-align: center;
    }

    .feature-icon {
        margin: 0 auto 15px;
    }

    .feature-card h3 {
        font-size: 20px;
        margin-bottom: 10px;
    }

    .feature-card p {
        font-size: 15px;
        line-height: 1.5;
    }
}

/* Additional mobile tweaks */
@media screen and (max-width: 480px) {
    .hero-stats {
        flex-direction: column;
    }

    .stat {
        width: 100%;
    }

    .stat-number {
        font-size: 32px;
    }

    .stat-label {
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    section {
        padding: var(--spacing-xl) 0;
    }

    .hero {
        padding-top: calc(var(--spacing-xxl) + 80px);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .testimonial-slider {
        grid-template-columns: 1fr;
    }

    .logo-grid {
        gap: var(--spacing-lg);
    }

    .logo-grid img {
        max-width: 100px;
    }
}

/* Video Popup Styles */
.video-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

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

.video-popup-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    background-color: black;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.video-popup-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    z-index: 2001;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Signup Popup Styles */
.signup-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.signup-popup.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.signup-popup-content {
    background: white;
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    position: relative;
    text-align: center;
}

.signup-popup h3 {
    margin-bottom: var(--spacing-md);
    color: var(--dark);
}

.signup-popup p {
    color: var(--dark-light);
    margin-bottom: var(--spacing-lg);
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.signup-form input {
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.signup-form input:focus {
    border-color: var(--primary);
    outline: none;
}

.popup-close {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--dark-light);
}

.popup-close:hover {
    color: var(--dark);
}

/* Logo Image Styles */
.logo {
    padding: 0 var(--spacing-sm);
}

.logo-img {
    height: 22px; 
    width: auto;
    display: block;
    object-fit: contain;
}

.footer-logo {
    margin-top: var(--spacing-lg); /* Match the margin-top of other column headers */
    margin-bottom: var(--spacing-lg);
}

.footer-logo .logo-img {
    height: 35px;
    object-fit: contain;
    width: 180px; /* Add fixed width to maintain aspect ratio */
    filter: none;
}

/* Template Library Styles */
.template-library {
    background-color: var(--light);
    padding: var(--spacing-xxxl) 0;
}

.template-filters {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-full);
    background: white;
    color: var(--dark);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-xl);
    padding: var(--spacing-md);
}

.template-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
    cursor: pointer; /* Add this line to show it's clickable */
}

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

.template-preview {
    position: relative;
    aspect-ratio: 9/16;
    overflow: hidden;
}

.template-preview img {
    width: 100%;
    height: 200%;  /* Make image twice the container height */
    object-fit: cover;
    object-position: top;  /* Start from top */
    transform: translateY(0);  /* Start position at top */
    transition: transform 1.5s ease-out;  /* Smooth transition for scrolling */
    will-change: transform;  /* Optimize for animations */
}

.template-card:hover .template-preview img {
    transform: translateY(-50%);  /* Move up to show bottom half */
}

.template-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.template-card:hover .template-overlay {
    opacity: 1;
}

.template-info {
    padding: var(--spacing-lg);
}

.template-info h3 {
    margin-bottom: var(--spacing-xs);
}

.template-info p {
    color: var(--dark-light);
    font-size: 0.9rem;
    margin-bottom: var(--spacing-sm);
}

.template-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 500;
}

.template-preview-btn {
    /* Keep button clickable but prevent its click from triggering card click */
    position: relative;
    z-index: 2;
}

/* Template Preview Popup */
.template-preview-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.template-preview-popup.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.template-preview-content {
    background: white;
    width: 90%;
    max-width: 500px;
    height: 90vh;
    border-radius: var(--radius-lg);
    position: relative;
    display: flex;
    flex-direction: column;
}

.template-preview-content .preview-scroll {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.template-preview-content img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain; /* Preserve aspect ratio */
}

.template-preview-actions {
    padding: var(--spacing-lg);
    border-top: 1px solid var(--light-gray);
    background: white;
    text-align: center;
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1;
}

.template-preview-actions .btn {
    min-width: 200px;
}

.template-preview-close {
    position: fixed; /* Change to fixed to stay visible while scrolling */
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-lg);
    z-index: 2001;
}

/* Templates CTA */
.templates-cta {
    text-align: center;
    margin-top: var(--spacing-xl);
    padding-top: var(--spacing-lg);
}

.show-all-templates {
    min-width: 200px;
    font-size: 1.1rem;
}
