@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800;900&display=swap');

/* === FIX: Add spacing to lower rocket and text from navigation === */
.public-layout .hero-headline-wrapper {
    padding-top: 1rem !important; /* Reduced from 2rem to 1rem for better spacing */
    margin-top: 0.5rem !important; /* Reduced from 1rem to 0.5rem for better spacing */
}

/* === END FIX === */

/* === IPAD-SPECIFIC SPACING ADJUSTMENT === */
/* Reduce spacing on iPad devices since desktop spacing is perfect */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .public-layout .hero-headline-wrapper {
        padding-top: 0.5rem !important; /* Reduce from 1rem to 0.5rem on iPad */
        margin-top: 0.25rem !important; /* Reduce from 0.5rem to 0.25rem on iPad */
    }
}

/* More specific iPad targeting with higher specificity */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .public-layout .hero-headline-wrapper {
        padding-top: 0.25rem !important; /* Even less padding for portrait */
        margin-top: 0.125rem !important; /* Minimal margin for portrait */
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .public-layout .hero-headline-wrapper {
        padding-top: 0.375rem !important; /* Medium padding for landscape */
        margin-top: 0.25rem !important; /* Medium margin for landscape */
    }
}

/* === END IPAD FIX === */

/* === ALTERNATIVE IPAD FIX - Target multiple containers === */
/* If the above doesn't work, try targeting the parent containers */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .public-layout .hero-section {
        padding-top: 0.5rem !important; /* Reduce hero section padding on iPad */
    }
    
    .public-layout .hero-content {
        padding-top: 0.5rem !important; /* Reduce hero content padding on iPad */
    }
    
    /* Force override with maximum specificity */
    .public-layout .hero-section .hero-content .hero-headline-wrapper {
        padding-top: 0.25rem !important;
        margin-top: 0.125rem !important;
    }
}

/* === END ALTERNATIVE FIX === */

/* Public Layout Styles - For non-authenticated pages */
.public-layout {
    /* CSS Variables for public pages */
    --public-primary-color: #0056b3;
    --public-primary-light: #40a9ff;
    --public-primary-dark: #003d82;
    --public-success-color: #52c41a;
    --public-warning-color: #faad14;
    --public-danger-color: #ff4d4f;
    --public-text-color: #2c3e50;
    --public-text-light: #666;
    --public-background-light: #f0f5fa;
    --public-white: #ffffff;
    --header-height: 4rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: var(--header-height);
}

/* Special case for home page which needs more space */
.public-layout.home-page {
    padding-top: calc(var(--header-height) + 1rem);
}

.public-layout {
    font-family: 'Poppins', sans-serif;
    color: var(--public-text-color);
    line-height: 1.6;
    background: linear-gradient(135deg, var(--public-background-light) 0%, var(--public-white) 100%);
}

/* Prevent horizontal scroll on the body */
body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Ensure all elements use border-box */
* {
    box-sizing: border-box;
}

/* Header Styles */
.public-layout .site-header {
    background: var(--public-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    left: 0;
    right: 0;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.public-layout .header-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.public-layout .logo-container {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.public-layout .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--public-primary-color);
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
    margin-bottom: 2px;
}

.public-layout .slogan {
    font-size: 0.8rem;
    color: var(--public-text-light);
    font-weight: 400;
    line-height: 1;
}

.public-layout nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.public-layout nav a {
    color: var(--public-text-color);
    text-decoration: none;
    font-weight: 500;
}

.public-layout nav a i {
    font-size: 24px; /* Increased from default size */
}

.public-layout nav a:hover {
    color: var(--public-primary-color);
}

.public-layout .login-btn, .public-layout .signup-btn {
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
}

.public-layout .login-btn {
    color: var(--public-primary-color);
    border: 2px solid var(--public-primary-color);
}

.public-layout .signup-btn {
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    color: var(--public-white);
}

.public-layout .login-btn:hover, .public-layout .signup-btn:hover {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
}

.public-layout .signup-btn:hover {
    background: #000 !important;
    color: #fff !important;
}

/* Hero Section - simplified */
.public-layout .hero-section {
    background: linear-gradient(135deg, var(--public-background-light) 0%, var(--public-white) 100%);
    width: 100%;
    text-align: center;
    padding: 0;
    margin: 0;
}

/* Hero headline styles - cleaned up */
.hero-headline-wrapper {
    width: 100%;
    text-align: center;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.hero-headline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem; /* Doubled from 0.5rem to 1rem for better spacing */
    font-size: 3.6rem;
    font-weight: 800;
    line-height: 1.1;
    padding: 0;
}

.hero-headline i {
    font-size: 3.6rem;
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.9;
    padding: 0;
    margin: 0;
}

.hero-headline .gradient-text {
    background: linear-gradient(135deg, #1a6bc4 0%, var(--public-primary-light) 100%); /* Start with lighter blue #1a6bc4 instead of darker #0056b3 */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    padding: 0;
    margin: 0;
}

.public-layout .hero-title-with-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 0;
    font-size: 3rem;
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.public-layout .hero-title-with-icon i {
    font-size: 4rem;
    margin-right: 1rem; /* Add default spacing */
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 0.9;
}

.public-layout .hero-content h2 {
    font-size: 2.2rem;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    color: var(--public-text-color);
    font-weight: 600;
}

.public-layout .hero-content h2.hero-value-prop {
    font-size: 1.7rem !important;
    margin-top: 0;
    margin-bottom: 0;
    color: var(--public-text-color);
    font-weight: 600;
    position: relative;
}

/* Add small blue divider under hero value prop text */
.public-layout .hero-content h2.hero-value-prop::after {
    content: '';
    position: absolute;
    bottom: -0.75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--public-primary-color);
}

.public-layout .hero-content p {
    font-size: 1.2rem;
    color: var(--public-text-light);
    margin-bottom: 2rem;
}

.public-layout .stats-section-header {
    font-size: 1.7rem;
    color: var(--public-white);
    font-weight: 600;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    text-align: center;
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    order: -1;
    padding: 0.5rem 1rem;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    /* Removed box-shadow to match rest of site */
}

/* Removed shimmer animation effect to match rest of site */

.public-layout .hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.public-layout .cta-button {
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    color: var(--public-white);
    padding: 1rem 2.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.public-layout .cta-button:hover {
    background: #000 !important;
    color: #fff !important;
}

.public-layout .learn-more {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--public-primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 1rem 2rem;
}

.public-layout .learn-more i {
    transition: transform 0.3s ease;
}

.public-layout .learn-more:hover i {
    transform: translateX(5px);
}

/* Stats Cards */
.public-layout .hero-stats {
    position: relative;
    margin-top: 1rem;
    padding: 2rem 2rem 4.5rem 2rem;
    background: white;
    text-align: center;
    min-height: 200px;
}

/* Debug: Check if hero-section has bottom margin contributing to gap */
.public-layout .hero-section {
    margin-bottom: 0 !important;
}

.public-layout .stat-card {
    background: var(--public-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1;
    max-width: 400px;
    border: 2px solid var(--public-primary-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease; /* Add smooth transition for hover effects */
}

/* Problem card styling (Rejected) */
.public-layout .stat-card:first-child {
    border-color: #ff4d4f;
    background: linear-gradient(135deg, #fff5f5 0%, #fff 100%);
    position: relative;
    box-shadow: 0 6px 25px rgba(255, 77, 79, 0.15);
    transform: scale(0.98);
}

.public-layout .stat-card:first-child::before {
    content: '\f071'; /* FontAwesome warning icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #ff4d4f;
    opacity: 0.8;
    animation: pulse 1.5s infinite;
    font-size: 2rem;
    opacity: 1;
}

.public-layout .stat-card:first-child .stat-number {
    color: #ff4d4f;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(255, 77, 79, 0.2);
}

/* Solution card styling (Accepted) */
.public-layout .stat-card.highlight {
    border-color: #52c41a;
    background: linear-gradient(135deg, #f6ffed 0%, #fff 100%);
    position: relative;
    box-shadow: 0 4px 20px rgba(82, 196, 26, 0.1);
    transform: scale(0.98);
}

.public-layout .stat-card.highlight::before {
    content: '\f00c'; /* FontAwesome check icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: #52c41a;
    opacity: 0.8;
    animation: bounce 1.2s infinite;
    font-size: 2rem;
    opacity: 1;
}

.public-layout .stat-card.highlight .stat-number {
    color: #52c41a;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(82, 196, 26, 0.2);
}

.public-layout .hero-stats .stat-cards-container {
    display: flex;
    gap: 2rem;
    justify-content: center;
    width: 100%;
    margin-top: 5rem;
}

.public-layout .hero-stats .stats-section-header {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    text-align: center;
    z-index: 10;
}

@media (max-width: 768px) {
    .public-layout .hero-stats .stat-cards-container {
        flex-direction: column;
        align-items: center;
    }
    
    .public-layout .hero-stats {
        padding: 1.5rem;
    }
}

.public-layout .stat-card.highlight {
    background: linear-gradient(135deg, #f6ffed 0%, #fff 100%) !important;
    color: var(--public-text-color) !important;
}

.public-layout .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--public-text-color);
}

.public-layout .stat-text {
    font-size: 1rem;
    color: var(--public-text-light);
}

/* Stat card headers styling */
.public-layout .stat-header {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--public-text-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid transparent;
    padding-bottom: 0.5rem;
    transition: all 0.3s ease;
}

/* Problem card header styling */
.public-layout .stat-card:first-child .stat-header {
    color: #ff4d4f;
    border-bottom-color: rgba(255, 77, 79, 0.3);
}

/* Solution card header styling */
.public-layout .stat-card.highlight .stat-header {
    color: #52c41a;
    border-bottom-color: rgba(82, 196, 26, 0.3);
}

/* Hover effects for headers */
.public-layout .stat-card:first-child:hover .stat-header {
    border-bottom-color: rgba(255, 77, 79, 0.6);
}

.public-layout .stat-card.highlight:hover .stat-header {
    border-bottom-color: rgba(82, 196, 26, 0.6);
}

.public-layout .stat-card.highlight .stat-number {
    color: #52c41a !important;
}

.public-layout .stat-card.highlight .stat-text {
    color: var(--public-text-color) !important;
}

/* Hover effects for enhanced visual appeal */
.public-layout .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
    /* Transition now handled by base .stat-card class */
}

.public-layout .stat-card:first-child:hover {
    border-color: #ff7875;
    box-shadow: 0 8px 30px rgba(255, 77, 79, 0.25);
    transform: scale(1.05);
}

.public-layout .stat-card.highlight:hover {
    border-color: #73d13d;
    box-shadow: 0 6px 25px rgba(82, 196, 26, 0.15);
    transform: scale(1.05); /* Changed from 1.02 to 1.05 to match red card */
}

/* Ensure icons are visible and properly positioned */
.public-layout .stat-card:first-child::before,
.public-layout .stat-card.highlight::before {
    z-index: 2;
    transition: all 0.3s ease;
}

.public-layout .stat-card:first-child:hover::before {
    transform: scale(1.1);
    opacity: 1;
}

.public-layout .stat-card.highlight:hover::before {
    transform: scale(1.1);
    opacity: 1;
}

/* ATS Demo Section */
.public-layout .ats-demo-section {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 2rem;
    color: #fff;
    background: var(--public-primary-color) !important;
}

.public-layout .ats-demo-section h2 {
    font-size: 2rem;
    color: var(--public-white);
    font-weight: 700;
    margin: 0 0 3rem 0;
    text-align: center;
}

/* Keep the general section heading styles separate */
.public-layout .section-content h2 {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    font-size: 2.5rem;
    color: var(--public-text-color);
    font-weight: 700;
    margin-bottom: 2rem;
    margin-top: 0;
}

.public-layout .section-content {
}

.public-layout .ats-explanation {
    flex: 1.2;
    min-width: 0;
}

.public-layout .ats-explanation h3 {
    font-size: 1.8rem;
    margin: 0 0 1rem 0;
    color: var(--public-white);
}

.public-layout .ats-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.public-layout .ats-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.public-layout .ats-features i {
    color: var(--public-success-color);
}

.public-layout .ats-demo-container {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    justify-content: center;
}

.public-layout .ats-score-section {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2rem;
    color: var(--public-white);
    display: flex;
    align-items: center;
    justify-content: center;

}

.public-layout .ats-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.public-layout .meter-container {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.public-layout .meter-container svg {
    width: 100%;
    height: 100%;
}

.public-layout .meter-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--public-white);
}

.public-layout .ats-key {
    flex: 1;
}

    .public-layout .ats-key div {
        padding: 4px 12px;
        display: flex;
        align-items: center;
        color: white;
        white-space: nowrap;
        margin-bottom: 0.5rem;
        line-height: 1;
    }
    
    /* REMOVED: Small phone breakpoint - consolidated into 2 breakpoints */

/* REMOVED: Landscape orientation breakpoint - consolidated into 2 breakpoints */

.public-layout .ats-key div div {
    width: 20px !important;
    height: 20px !important;
    border-radius: 6px;
    margin-right: 12px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
}

.public-layout .ats-key span {
    color: rgba(255,255,255,0.9) !important;
    font-size: 1.1em;
    line-height: 1;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

/* How It Works */
.public-layout .how-it-works {
    padding: 3rem 2rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    background: white;
}

.public-layout .how-it-works h2 {
    font-size: 2.2rem;
    margin-bottom: 3rem;
    color: var(--public-text-color);
    margin-top: 0;
}

.public-layout .steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 3rem;
}

.public-layout .step-card {
    background: var(--public-white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.3s ease;
}

.public-layout .step-card:hover {
    transform: translateY(-5px);
}

.public-layout .step-number {
    background: var(--public-primary-color);
    color: var(--public-white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* Testimonials */
.public-layout .testimonials-section {
    padding: 0rem 2rem;
    background: var(--public-white);
}

.public-layout .testimonials-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

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

.public-layout .testimonial-card {
    background: var(--public-background-light);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.public-layout .testimonial-card:hover {
    transform: translateY(-5px);
}

.public-layout .testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
    position: relative;
    padding: 0 1rem;
}



.public-layout .testimonial-author strong {
    display: block;
    font-weight: 600;
    color: var(--public-text-color);
}

.public-layout .testimonial-author span {
    color: var(--public-text-light);
    font-size: 0.9rem;
}

/* Features */
.public-layout .features-section {
    padding: 2rem 2rem;
    background: var(--public-background-light);
}

.public-layout .features-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.public-layout .features-section h2 {
    margin-top: 0;
}

.public-layout .features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center; /* allow centering when explicit column count < available space */
}

/* Desktop-specific constraint for feature cards to prevent full width */
@media (min-width: 769px) {
    .public-layout .features-grid {
        /* With three cards, use 3 fixed columns and center within max width */
        grid-template-columns: repeat(3, minmax(280px, 1fr));
        max-width: 1100px;
        margin-left: auto;
        margin-right: auto;
        justify-items: center;   /* center each card if column is wider than card */
        align-items: stretch;
    }
}

.public-layout .feature-card {
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease;
    color: var(--public-white);
}

.public-layout .feature-card:hover {
    transform: translateY(-5px);
}

.public-layout .feature-card i {
    font-size: 3rem;
    color: var(--public-white);
    margin-bottom: 1rem;
}

/* CTA Section */
.public-layout .cta-section {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 2rem;
    color: #fff;
    background: var(--public-primary-color) !important;
}

/* CTA Button on Blue Background - High Contrast */
.public-layout .cta-section .cta-button {
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #fff;
}

.public-layout .cta-section .cta-button:hover {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #000;
}

.public-layout .cta-section h2,
.public-layout .cta-section p,
.public-layout .cta-section a {
    color: #fff !important;
}

.public-layout .cta-section {
    padding: 2rem 2rem;
    text-align: center;
    color: var(--public-white);
}

.public-layout .cta-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.public-layout .cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.public-layout .cta-section h2 {
    margin-top: 0;
}

/* Footer Styles */
.public-layout .site-footer {
    background: var(--public-text-color);
    color: var(--public-white);
    padding: 3rem 0 1rem;
    margin-top: auto;
    width: 100%;
    box-sizing: border-box;
}

/* --- Desktop (default) styles --- */
.public-layout .footer-content {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.public-layout .footer-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.public-layout .footer-section h3 {
    color: var(--public-white);
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 700;
}

.public-layout .footer-section p {
    margin: 0;
    opacity: 0.8;
}

.public-layout .footer-section a {
    color: rgba(255, 255, 255, 0.85) !important; /* consistent off-white */
    text-decoration: none;
    opacity: 1 !important; /* avoid perceived color shifts on breakpoints */
    transition: opacity 0.3s ease;
    display: inline-block;
    width: fit-content;
    margin-bottom: 0.5rem;
}

.public-layout .footer-section a:hover {
    opacity: 1;
    text-decoration: underline;
}

.public-layout .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 0.25rem;
}

.public-layout .social-links a {
    font-size: 1.5rem;
}

.public-layout .footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile menu overlay */
.public-layout .mobile-menu-overlay {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 999;
}

.public-layout .mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Styles */
@media (max-width: 768px) {
    .public-layout.home-page {
        padding-top: var(--header-height);
    }

    .public-layout .header-content {
        display: flex;
        align-items: center;
        padding: 0 1rem;
        height: var(--header-height);
    }

    .public-layout .mobile-menu-btn {
        display: block;
    }

    .public-layout .mobile-signup-btn {
        display: inline-block;
        margin-left: auto;
        margin-right: 0.8rem;
    }

    .public-layout nav {
        display: none;
    }

    .public-layout .hero-section {
        padding: 2rem 1rem;
        margin: 0;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .public-layout .hero-content {
        padding: 0;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    .public-layout .hero-title-with-icon {
        font-size: 2.5rem !important; /* Increased from 2rem to maintain hierarchy with subtitle */
        gap: 0.5rem;
        text-align: center;
        justify-content: center;
        align-items: center;
        background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        display: inline-flex !important;
        margin: 0 auto !important;
        width: fit-content !important;
        max-width: fit-content !important;
    }
    
    .public-layout .hero-title-with-icon i {
        margin-right: 1.5rem !important; /* Increase from 1rem to 1.5rem (8px more) */
        background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        opacity: 0.9;
    }

    .public-layout .hero-content h2 {
        font-size: 1.8rem;
        margin: 1rem 0;
        text-align: center;
    }

    .public-layout .hero-content p {
        margin: 1rem 0;
        text-align: center;
    }

    .public-layout .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        box-sizing: border-box;
    }

    .public-layout .hero-stats {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0 1rem;
        margin: 2rem auto;
        gap: 1.5rem;
        box-sizing: border-box;
        max-width: 600px;
    }

    .public-layout .stat-card {
        width: 100%;
        margin: 0;
        padding: 2rem;
        text-align: center;
        background: var(--public-white);
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        box-sizing: border-box;
        max-width: none;
    }

    .public-layout .cta-button,
    .public-layout .hero-buttons .cta-button {
        width: 95%;
        margin: 0 auto;
        display: block;
        text-align: center;
        padding: 1rem;
        box-sizing: border-box;
        border-radius: 25px;
    }

    .public-layout .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .public-layout .testimonial-card {
        width: 100%;
    }

    .public-layout .features-grid {
        grid-template-columns: 1fr;
    }
    
    .public-layout .feature-card {
        background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
        color: var(--public-white);
    }
    
    .public-layout .feature-card i {
        color: var(--public-white);
    }
    
    .public-layout .feature-card h3 {
        color: var(--public-white);
    }
    
    .public-layout .feature-card p {
        color: rgba(255, 255, 255, 0.9);
    }

    .public-layout .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
        text-align: center;
    }

    .public-layout .footer-section {
        align-items: center;
    }

    .public-layout .social-links {
        justify-content: center;
    }

    .public-layout .footer-bottom {
        margin-top: 1rem;
        padding: 1rem;
    }

    .public-layout .success-message-container {
        width: calc(100% - 2rem);
        left: 1rem;
        right: 1rem;
        transform: none;
    }

    main,
    .public-layout main.centered-content {
        padding: 0 1rem;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .public-layout main.centered-content h1 {
        margin-top: 0;
    }

    .public-layout main.centered-content p {
        margin-top: -1rem;
    }

    .public-layout main.with-mobile-message {
        margin-top: -0.5rem !important;
        padding-top: 0 !important;
    }

    .login-form,
    .signup-form {
        background: var(--public-white);
        border: 1px solid rgba(0, 0, 0, 0.1);
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        padding: 1.5rem;
    }

    .form-group input {
        padding: 0.75rem;
        font-size: 16px; /* Prevent zoom on iOS */
    }

    /* How It Works Section Fix */
    .public-layout .how-it-works {
        padding: 2rem 0;
        margin: 0;
        width: 100%;
    }

    .public-layout .how-it-works h2 {
        font-size: 1.8rem;
        margin: 0 0 2rem;
        padding: 0 1rem;
        text-align: center;
    }

    .public-layout .steps-container {
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
        margin: 0;
        gap: 1.5rem;
    }

    .public-layout .step-card {
        width: calc(100% - 2rem);
        margin: 0 1rem;
        padding: 2rem;
        text-align: center;
        background: var(--public-white);
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        box-sizing: border-box;
    }

    /* Ensure consistent section padding */
    .public-layout section {
        padding-left: 0;
        padding-right: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .public-layout .ats-demo-section {
        padding: 2rem 1rem;
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    .public-layout .ats-demo-section h2 {
        font-size: 2rem;
        line-height: 1.2;
        margin: 0 0 1.5rem;
        padding: 0;
        max-width: 100%;
        white-space: normal;
    }

    .public-layout .ats-demo-container {
        flex-direction: column;
        padding: 0;
        gap: 1.5rem;
        width: 100%;
        overflow: hidden;
    }

    /* Stack donut above the colored key on small screens */
    .public-layout .ats-content {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .public-layout .ats-key {
        width: 100%;
    }

    .public-layout .ats-explanation {
        min-width: 0;
        width: 100%;
        padding: 0;
        margin: 0;
    }

    .public-layout .ats-explanation h3 {
        font-size: 1.5rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .public-layout .ats-explanation p {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .public-layout .ats-score-section {
        width: 100%;
        padding: 0;
        margin: 1rem 0;
    }

    .public-layout .ats-features {
        padding: 0;
        margin: 1rem 0;
    }

    .public-layout .ats-features li {
        margin-bottom: 0.8rem;
        font-size: 1rem;
        line-height: 1.4;
    }

    .public-layout .ats-features li i {
        flex-shrink: 0;
    }

    .public-layout .ats-key div {
        white-space: normal;
        flex-wrap: wrap;
    }

    .public-layout .logo {
        font-size: 1.2rem;
        line-height: 1.1;
        margin-bottom: 1px;
    }

    .public-layout .slogan {
        font-size: 0.6rem;
        line-height: 1;
    }

    .public-layout .mobile-menu-btn {
        flex-shrink: 0;
    }

    .public-layout .mobile-signup-btn {
        flex-shrink: 0;
        margin-right: 0.5rem;
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }

    .public-layout .header-content {
        padding: 0 0.5rem;
        width: 100%;
        box-sizing: border-box;
    }
}

/* REMOVED: Excessive tablet breakpoint - consolidated into 2 breakpoints */

/* SIMPLIFIED: Only 2 breakpoints - Desktop/Tablet (769px+) and Mobile (768px-) */

/* iPad Portrait - Full-width stats section and font size fixes */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    /* Override main content container width constraints - only for pages with hero stats */
    .public-layout main.centered-content:has(.hero-stats) {
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    /* Make hero-stats container full viewport width */
    .public-layout .hero-stats {
        width: 100vw !important;
        margin-left: calc(-50vw + 50%) !important;
        margin-right: calc(-50vw + 50%) !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        position: relative !important;
    }

    /* Remove rounded edges and make stats section header full width */
    .public-layout .hero-stats .stats-section-header {
        width: 100vw !important;
        left: 0 !important;
        transform: none !important;
        border-radius: 0 !important;
        margin-left: 0 !important;
        max-width: 100vw !important;
    }
    
    /* Fix hero title font size to be larger than subtitle */
    .public-layout .hero-title-with-icon {
        font-size: 3rem !important;
    }
    
    .public-layout .hero-content h2 {
        font-size: 2.2rem !important;
    }
}

/* Desktop/Tablet: 2 cards side by side */
@media (min-width: 769px) {
    .public-layout .hero-stats .stat-cards-container {
        display: flex;
        flex-direction: row;
        gap: 2rem;
        justify-content: center;
        align-items: stretch;
    }
    
    .public-layout .stat-card {
        flex: 1;
        max-width: 400px; /* Increased from 300px for better desktop layout */
        min-width: 300px;
    }
    
    .public-layout .features-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .public-layout .steps-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

/* Mobile: 2 cards stacked */
@media (max-width: 768px) {
    .public-layout .hero-stats .stat-cards-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }
    
    .public-layout .hero-stats {
        padding: 1.5rem;
    }
    
    .public-layout .stat-card {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
    
    .public-layout .features-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .public-layout .steps-container {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* REMOVED: Small phone breakpoints - consolidated into 2 breakpoints */

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.public-layout .hero-content, .public-layout .stat-card, .public-layout .step-card, .public-layout .feature-card {
    animation: fadeIn 0.6s ease-out;
}

.public-layout .step-card:nth-child(2) {
    animation-delay: 0.1s;
}

.public-layout .step-card:nth-child(3) {
    animation-delay: 0.2s;
}

.public-layout .step-card:nth-child(4) {
    animation-delay: 0.3s;
}

.public-layout .feature-card:nth-child(2) {
    animation-delay: 0.1s;
}

.public-layout .feature-card:nth-child(3) {
    animation-delay: 0.2s;
}

.public-layout .feature-card:nth-child(4) {
    animation-delay: 0.3s;
}

/* === LOGIN AND SIGNUP PAGE STYLES === */
main {
    max-width: 600px;
    width: 100%;  /* Changed from fixed 600px */
    margin: 1rem auto 2rem;
    padding: 2rem;
    flex: 1;
    box-sizing: border-box;
}

/* For pages with centered content (login, signup, or any similar form pages) */
.public-layout main.centered-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    text-align: center;
}

.public-layout main.centered-content h1 {
    font-size: 2.5rem;
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.public-layout main.centered-content p {
    color: var(--public-text-light);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.login-form, .signup-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--public-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--public-text-color);
    font-weight: 600;
    text-align: left;
}

.form-group input {
    width: 100%;
    padding: 1rem;
    padding-right: 3rem;
    border: 2px solid #e1e8ed;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--public-primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

.form-group .toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
    font-size: 1.1em;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    margin-top: 12px;
}

/* Adjust the position for password fields specifically */
.form-group input[type="password"] ~ .toggle-password {
    margin-top: 12px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    margin: 1.5rem 0;
}

.checkbox-group input[type="checkbox"] {
    margin: 0.25rem 0.75rem 0 0 !important;
    width: 18px !important;
    height: 18px !important;
    transform: none !important;
    border-radius: 0 !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border: 2px solid #333 !important;
    background-color: #fff !important;
    position: relative !important;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
    min-width: 18px !important;
    min-height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    vertical-align: middle !important;
    flex-shrink: 0 !important;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: #007bff !important;
    border-color: #007bff !important;
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✓' !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    transform: translate(-50%, -50%) !important;
    color: white !important;
    font-size: 12px !important;
    font-weight: bold !important;
}

.checkbox-group label {
    font-weight: 400;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-group label a {
    color: var(--public-primary-color);
    text-decoration: none;
}

.checkbox-group label a:hover {
    text-decoration: underline;
}

.login-form .cta-button,
.signup-form .cta-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    white-space: nowrap;
    margin: 1.5rem 0;
    padding: 1rem;
    font-size: 1.1rem;
    text-align: center;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    color: var(--public-white);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
}

.login-form .cta-button:hover,
.signup-form .cta-button:hover {
    background: #000 !important;
    color: #fff !important;
}

/* Public button styling for login, signup, forgot password pages */
.public-button {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    white-space: nowrap;
    margin: 1.5rem 0;
    padding: 1rem;
    font-size: 1.1rem;
    text-align: center;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    color: var(--public-white);
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
}

.public-button:hover {
    background: #000 !important;
    color: #fff !important;
}

.login-form .cta-button i,
.signup-form .cta-button i {
    font-size: 1.25rem;
    margin: 0;
    flex-shrink: 0;
}

/* Remove any conflicting styles */
.login-btn.cta-button,
.signup-btn.cta-button {
    display: inline-flex !important;
    text-align: center !important;
    justify-content: center !important;
}

.login-footer, .signup-footer {
    text-align: center;
    color: var(--public-text-light);
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid #e1e8ed;
}

.login-footer a, .signup-footer a {
    color: var(--public-primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover, .signup-footer a:hover {
    text-decoration: underline;
}

/* === HOMEPAGE-SPECIFIC FIXES === */
/* Make blue sections full width and text white */
.public-layout .ats-demo-section,
.public-layout .cta-section {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 2rem;
    color: #fff;
    background: var(--public-primary-color) !important;
}

.public-layout .cta-section h2,
.public-layout .cta-section p,
.public-layout .cta-section a {
    color: #fff !important;
}

.public-layout .cta-section {
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%) !important;
    position: relative;
    overflow-x: hidden;
}

.public-layout .ats-demo-section {
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%) !important;
}

/* Restore 4-column grid for steps, features, testimonials on desktop */
@media (min-width: 1200px) {
    .public-layout .steps-container,
    .public-layout .features-grid,
    .public-layout .testimonials-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 2rem;
    }
}

/* Make feature/testimonial/step cards wider on desktop */
@media (min-width: 992px) {
    .public-layout .feature-card,
    .public-layout .step-card,
    .public-layout .testimonial-card {
        min-width: 0;
        max-width: 340px;
        margin: 0 auto;
    }
}

/* Tablet/iPad: keep two columns but center the odd third card on its own row */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .public-layout .features-grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
        justify-content: center; /* center the grid within container */
        justify-items: center;   /* center items within their tracks */
        max-width: 900px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Narrow desktop widths (<= 1100px): fall back to 2 columns but keep centering */
@media (min-width: 769px) and (max-width: 1100px) {
    .public-layout .features-grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
        justify-content: center;
        justify-items: center;
    }
}

/* Ensure white text in blue sections */
.public-layout .ats-demo-section *,
.public-layout .cta-section * {
    color: #fff !important;
}

/* Override for footer to ensure it stays black */
.public-layout .site-footer,
.public-layout .site-footer * {
    color: var(--public-white) !important;
    background: var(--public-text-color) !important;
}

/* REMOVED: Tablet breakpoint - consolidated into 2 breakpoints */

/* Fix for blue bar under features/cta to be full width */
.public-layout .cta-section {
    box-shadow: 0 0 0 100vmax var(--public-primary-color);
    clip-path: inset(0 -100vmax);
}

/* Remove any .main-section padding/margin from homepage */
.public-layout .main-section {
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* HOMEPAGE SECTION SPACING AND ALIGNMENT FIXES */
.public-layout .ats-demo-section h2 {
    margin-top: 0rem !important;
    margin-bottom: 2.5rem !important;
}
.public-layout .ats-explanation p {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}
@media (min-width: 992px) {
    .public-layout .feature-card,
    .public-layout .step-card,
    .public-layout .testimonial-card {
        min-width: 0 !important;
        max-width: 320px !important;
        padding: 2.5rem 2rem !important;
    }
    .public-layout .features-grid,
    .public-layout .steps-container,
    .public-layout .testimonials-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Restore green checkmarks in ATS features list */
.public-layout .ats-demo-section .ats-features li i {
    color: var(--public-success-color) !important;
}

@media (min-width: 992px) {
  .public-layout .ats-explanation {
    min-width: 0;
    max-width: 600px;
    flex: 2 1 0%;
  }
  .public-layout .ats-score-section {
    max-width: 340px;
    flex: 1 1 0%;
  }
}

/* Error message styling */
.error-message {
    color: #d32f2f;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: block;
}

/* Message wrapper styles */
.public-layout .message-wrapper {
    width: 100%;
    padding-top: calc(4rem + 1rem); /* Header height + 1rem gap */
    margin-bottom: 1.5rem;
}

/* Message container styles for public pages */
.public-layout .success-message-container {
    position: absolute;
    top: 6.25rem;  /* Match the header height */
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    z-index: 999;
    padding: 1rem;
    margin: 0;
    text-align: center;
    background-color: #e8f5e9;
    border: 1px solid #c8e6c9;
    border-radius: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .public-layout .message-wrapper {
        padding-top: 0 !important;
        margin-bottom: 0 !important;
    }

    .public-layout .success-message-container {
        position: relative !important;
        top: auto !important;
        width: calc(100% - 2rem);
        left: auto;
        right: auto;
        transform: none;
        z-index: 1000 !important;
        margin: 1rem auto 0.5rem auto;
    }
}

.public-layout .success-message-container.error {
    background-color: #fff2f0;
    border-color: #ffccc7;
    color: #ff4d4f;
}

.public-layout .success-message-text {
    margin: 0;
    padding-right: 20px;  /* Add space for the close button */
    color: #2e7d32;
}

.public-layout .success-message-close {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #2e7d32;
    cursor: pointer;
    padding: 0;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.public-layout .success-message-close:hover {
    opacity: 1;
}

/* Add margin to main content when message is present */
.public-layout .success-message-container + main {
    margin-top: 3.5rem;
}

/* Ensure desktop messages push content down - class-based approach */
@media (min-width: 769px) {
    .public-layout main.with-desktop-message {
        margin-top: 3.5rem !important;
    }
}

/* Reset margin for home page hero section */
.public-layout .hero-section .success-message-container {
    margin: 8px auto 0 auto;  /* Reset margin for home page */
}

/* Reset margin if inside other containers */
.public-layout .main-section .success-message-container,
.public-layout .content-section .success-message-container {
    margin: 0 auto;
}

/* === PUBLIC MESSAGE BANNER: universal in-flow centering and header clearance === */
/* Ensure the banner never overlaps the fixed header at any breakpoint */
.public-layout .success-message-container {
    position: relative !important; /* keep in document flow */
    top: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
    width: min(800px, calc(100% - 2rem)) !important;
    max-width: 800px !important;
    margin: 0.75rem auto 0 !important; /* small nudge below header, centered */
    float: none !important;
}

/* Remove legacy displacement when banner was absolutely positioned */
.public-layout .success-message-container + main {
    margin-top: 0 !important;
}

/* Remove wrapper top padding that was used for absolute positioning */
.public-layout .message-wrapper {
    padding-top: 0 !important;
}

.success-message-text {
    margin: 0;
    color: #2e7d32;
}

/* Debug colors removed */

/* === MESSAGE SPACING: make banner in-flow and remove artificial gaps === */
/* 1) No artificial padding/margin around the wrapper */
.public-layout .message-wrapper {
  padding-top: 0 !important;
  margin-bottom: 0 !important;
}

/* 2) Banner sits in normal flow; just clear the fixed header a bit */
.public-layout .site-header + .success-message-container {
  margin-top: 0.75rem !important;
}
.public-layout .success-message-container {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;
  width: min(800px, calc(100% - 2rem)) !important;
  max-width: 800px !important;
  margin: 0.75rem auto 0 !important; /* no bottom gap below banner */
}

/* 3) Remove any legacy pushes on main content */
.public-layout .success-message-container + main,
.public-layout .success-message-container ~ main {
  margin-top: 0 !important;
}
.public-layout main.with-desktop-message,
.public-layout main.with-mobile-message {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.success-message-close {
    background: none;
    border: none;
    padding: 0;
    font-size: 20px;
    line-height: 1;
    color: #2e7d32;
    cursor: pointer;
}

.success-message-container.error {
    background-color: #ffebee;
    border: 1px solid #ffcdd2;
}

.success-message-text.error {
    color: #c62828;
}

/* Password-specific error message */
.password-error {
    color: #d32f2f;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* Only apply top margin when it's the first element after header */
.public-layout .site-header + .success-message-container {
    margin-top: calc(2rem + 20px);
}

/* Content wrapper for sections */
.public-layout .section-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Add scroll margin for all sections */
section[id] {
    scroll-margin-top: 5rem;
}

/* === LAYOUT VARIATIONS === */
/* For pages with centered content (login, signup, or any similar form pages) */
.public-layout main.centered-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    text-align: center;
}

.public-layout main.centered-content p {
    max-width: 100%;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.login-form, .signup-form {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--public-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.25rem;
}

.password-group {
    position: relative;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #333;
}

.toggle-password i {
    font-size: 16px;
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.login-footer p {
    margin: 0.75rem 0;
}

/* Ensure vertical gap between footer links on very small phones */
@media (max-width: 480px) {
  .login-footer p + p {
    margin-top: 0.75rem !important;
  }
}

/* Small-phone landscape: keep the gap when the viewport is short */
@media (max-height: 480px) and (orientation: landscape) {
  .login-footer p + p {
    margin-top: 0.75rem !important;
  }
}

.forgot-password-link {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-password-link:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* === MODAL STYLES === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(4px);
}

.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--public-white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    max-width: 800px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    margin: 0;
    color: var(--public-text-color);
    font-size: 1.8rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--public-text-light);
    cursor: pointer;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--public-text-color);
}

.modal-content {
    color: var(--public-text-color);
    line-height: 1.6;
}

.modal-content h3 {
    color: var(--public-text-color);
    margin: 1.5rem 0 1rem;
    font-size: 1.4rem;
}

.modal-content p {
    margin-bottom: 1rem;
    text-align: left;
}

.modal-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.modal-content li {
    margin-bottom: 0.5rem;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* === END MODAL STYLES === */

.public-layout .mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--public-primary-color);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    transition: color 0.3s ease;
}

.public-layout .mobile-menu-btn:hover {
    color: var(--public-primary-light);
}

.public-layout .mobile-menu-btn i {
    color: inherit;
}

@media (max-width: 1199px) {
    .public-layout .mobile-menu-btn {
        display: block;
    }
    .public-layout nav {
        display: none;
    }
    .public-layout nav.active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 4rem;
        right: 0;
        width: 100%;
        background: #fff;
        z-index: 1001;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 1.5rem;
        gap: 1rem;
    }

    /* Ensure Get Started sits immediately to the left of the burger with a gap */
    .public-layout .mobile-signup-btn {
        display: inline-block;
        margin-left: auto;    /* push to the right side */
        margin-right: 0.8rem; /* gap from burger */
    }
    .public-layout .mobile-menu-btn {
        margin-left: 0.5rem;  /* ensure consistent spacing from Get Started */
    }
}

@media (max-width: 768px) {
    .public-layout.home-page {
        padding-top: var(--header-height);
    }

    .public-layout .header-content {
        display: flex;
        align-items: center;
        padding: 0 1rem;
        height: var(--header-height);
    }

    .public-layout .mobile-menu-btn {
        display: block;
    }

    .public-layout .mobile-signup-btn {
        display: inline-block;
        margin-left: auto;
        margin-right: 0.8rem;
    }

    .public-layout nav {
        display: none;
    }

    .public-layout .hero-section {
        padding: 2rem 1rem;
        margin: 0;
        text-align: center;
        width: 100%;
        box-sizing: border-box;
    }

    .public-layout .hero-content {
        padding: 0;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    .public-layout .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
        text-align: center;
    }

    .public-layout .footer-section {
        align-items: center;
    }

    .public-layout nav {
        display: none;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--public-white);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        align-items: stretch;
        z-index: 1000;
        transform: translateY(-10px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .public-layout nav.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        max-height: 70vh;               /* phone usability */
        overflow-y: auto;               /* scroll if long */
        -webkit-overflow-scrolling: touch;
    }

    .public-layout nav a {
        padding: 0.75rem;
        text-align: center;
        border-radius: 8px;
        transition: all 0.3s ease;
        color: var(--public-text-color);
        font-weight: 500;
    }

    /* Remove transition from buttons in mobile nav to prevent flashing */
    .public-layout nav .login-btn,
    .public-layout nav .signup-btn {
        transition: none !important;
    }

    .public-layout nav a:hover {
        background: rgba(0, 0, 0, 0.05);
    }

    .public-layout .login-btn,
    .public-layout .signup-btn {
        display: inline-block;
        width: auto;
        min-width: 120px;
        max-width: 200px;
        margin: 0.5rem auto;
    }
}

/* iPad-specific: ensure menu becomes visible and centered when active */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .public-layout nav {
    top: var(--header-height) !important;
    left: 0 !important;
    right: 0 !important;
  }
  .public-layout nav.active {
    display: flex !important;
    transform: translateY(0) !important;
    opacity: 1 !important;
    max-height: 70vh !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

.public-layout .mobile-signup-btn {
    display: none;
    background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
    color: var(--public-white);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    white-space: nowrap;
    line-height: 1;
}

.public-layout .mobile-signup-btn:hover {
    background: #000 !important;
    color: #fff !important;
}



.public-layout .logo-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.public-layout .logo-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Navigation link hover effects */
.public-layout nav .nav-link {
    position: relative;
    padding: 8px 18px;
    display: inline-flex;
    align-items: center;
    background: none;
    border-radius: 0;
    border: none;
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.public-layout nav .nav-link:hover {
    color: #0056b3;
    background: none;
    border-radius: 0;
}

.public-layout nav .nav-link:hover::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 4px;
    height: 2px;
    background: #0056b3;
    border-radius: 2px;
    transition: background 0.2s;
}

/* Home icon hover effect - just turn blue like other nav items */
.public-layout nav .header-nav-btn:hover {
    color: var(--public-primary-color) !important;
}
.public-layout nav .header-nav-btn:hover i {
    color: var(--public-primary-color) !important;
}

/* Ensure Home icon and Login/Sign Up buttons never get underlines */
.public-layout nav .header-nav-btn::after,
.public-layout nav .login-btn::after,
.public-layout nav .signup-btn::after {
    display: none !important;
}

.public-layout nav .header-nav-btn:hover::after,
.public-layout nav .login-btn:hover::after,
.public-layout nav .signup-btn:hover::after {
    display: none !important;
}

.login-form .cta-button {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    margin: 1rem 0;
}

.login-form .cta-button i {
    font-size: 1.25rem;
} 

/* REMOVED: Tablet breakpoint - consolidated into 2 breakpoints */

/* Navigation responsive behavior */
@media (max-width: 1199px) {
  .public-layout nav:not(.active) {
    display: none !important;
  }
  .public-layout .mobile-signup-btn,
  .public-layout .mobile-menu-btn {
    display: inline-block !important;
  }
}

@media (min-width: 1200px) {
  .public-layout nav {
    display: flex !important;
  }
  .public-layout .mobile-signup-btn,
  .public-layout .mobile-menu-btn {
    display: none !important;
  }

  /* Ensure ATS demo section maintains proper desktop size */
  .public-layout .ats-demo-section {
    padding: 2rem;
  }

  .public-layout .ats-demo-container {
    gap: 4rem;
  }

  .public-layout .ats-score-section {
    max-width: 480px;
    padding: 2rem;
  }

  .public-layout .ats-explanation {
    flex: 1.2;
  }
}

/* iPad Portrait Mode - Force column layout for stat cards */
@media only screen and (min-width: 768px) and (max-width: 768px) and (orientation: portrait) {
  .public-layout .hero-stats {
    flex-direction: column !important;
    gap: 2rem !important;
    padding: 1rem !important;
  }
  
  .public-layout .stat-card {
    width: 100% !important;
    max-width: none !important;
    flex: none !important;
    margin: 1rem 0 !important;
  }
  
  .public-layout .stat-card:first-child {
    margin-right: 0 !important;
  }
  
  /* Debug gap issue for numbered cards 1-4 */
  .public-layout .steps-container {
    padding: 1rem !important;
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
  
  .public-layout .step-card {
    margin: 1rem 0 !important;
  }
  
  /* Debug missing content sections */
  .public-layout .ats-demo-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  .public-layout .how-it-works {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  .public-layout .testimonials-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  .public-layout .features-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  /* Debug footer issues on iPad portrait */
  .public-layout .site-footer {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  .public-layout .footer-section h3 {
    color: white !important;
    font-weight: bold !important;
    visibility: visible !important;
    opacity: 1 !important;
    display: block !important;
  }
  
  .public-layout .footer-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  .public-layout .footer-section {
    margin-bottom: 2rem !important;
  }
  
  .public-layout .footer-section h3 {
    margin-top: 1rem !important;
    margin-bottom: 1rem !important;
  }
  
  /* Debug How It Works section for burger menu link issue */
  .public-layout .how-it-works {
    scroll-margin-top: 100px !important;
    scroll-behavior: smooth !important;
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  .public-layout .how-it-works h2 {
    color: black !important;
  }
  
  /* Ensure proper scroll targeting for How It Works */
  .public-layout .how-it-works[id="how-it-works"] {
    scroll-margin-top: 100px !important;
  }
  
  /* Force scroll anchor positioning for iPad portrait */
  .public-layout .how-it-works:target {
    scroll-margin-top: 100px !important;
    padding-top: 100px !important;
  }
  
  /* Force scroll behavior activation for iPad portrait */
  .public-layout .how-it-works:focus,
  .public-layout .how-it-works:active,
  .public-layout .how-it-works:focus-within {
    scroll-margin-top: 100px !important;
    padding-top: 100px !important;
  }
  
  /* Ensure smooth scrolling is always active */
  html {
    scroll-behavior: smooth !important;
  }
  
  body {
    scroll-behavior: smooth !important;
  }
  
  /* Force scroll restoration for How It Works on iPad portrait */
  .public-layout .how-it-works {
    scroll-snap-align: start !important;
    scroll-snap-stop: always !important;
  }
  
  /* Ensure the section is always in the scroll flow */
  .public-layout .how-it-works:not(:target) {
    scroll-margin-top: 100px !important;
  }
  
  /* Fix burger menu scroll for iPad portrait */
  .public-layout .how-it-works[id="how-it-works"] {
    scroll-margin-top: 100px !important;
    scroll-padding-top: 100px !important;
  }
  
  /* Force scroll behavior for burger menu links */
  .public-layout nav a[href="#how-it-works"] {
    scroll-behavior: smooth !important;
  }
  
  /* Ensure proper scroll restoration */
  .public-layout .how-it-works {
    scroll-snap-type: y mandatory !important;
  }
  
  /* Portrait-specific viewport fixes */
  .public-layout .how-it-works {
    min-height: 0 !important;
    scroll-margin-top: 0 !important;
    scroll-padding-top: 0 !important;
  }
  
  /* Force viewport behavior for portrait */
  .public-layout .how-it-works:target {
    scroll-margin-top: 0 !important;
    scroll-padding-top: 0 !important;
  }
}

/* iPad Portrait Mode - Fix Features section scroll positioning */
@media only screen and (min-width: 768px) and (max-width: 768px) and (orientation: portrait) {
  .public-layout .features-section {
    scroll-margin-top: 100px !important;
    scroll-behavior: smooth !important;
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  .public-layout .features-section[id="features"] {
    scroll-margin-top: 100px !important;
    scroll-padding-top: 100px !important;
  }
  
  .public-layout .features-section:target {
    scroll-margin-top: 100px !important;
    padding-top: 100px !important;
  }
  
  .public-layout .features-section:focus,
  .public-layout .features-section:active,
  .public-layout .features-section:focus-within {
    scroll-margin-top: 100px !important;
    padding-top: 100px !important;
  }
  
  .public-layout .features-section:not(:target) {
    scroll-margin-top: 100px !important;
  }
  
  .public-layout nav a[href="#features"] {
    scroll-behavior: smooth !important;
  }
  
  /* Reduce top margin of hero-content within features section - iPad Portrait only */
  .public-layout .features-section .hero-content {
    margin-top: -50px !important;
  }
  
  .public-layout .features-section .hero-content h2 {
    margin-top: 1.4rem !important;
  }
  
  .public-layout .features-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }
}

/* iPad Landscape Mode - Fix Features section scroll positioning */
@media only screen and (min-width: 1024px) and (max-width: 1024px) and (orientation: landscape) {
  .public-layout .features-section {
    scroll-margin-top: 100px !important;
    scroll-behavior: smooth !important;
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  .public-layout .features-section[id="features"] {
    scroll-margin-top: 100px !important;
    scroll-padding-top: 100px !important;
  }
  
  .public-layout .features-section:target {
    scroll-margin-top: 100px !important;
    padding-top: 100px !important;
  }
  
  .public-layout .features-section:focus,
  .public-layout .features-section:active,
  .public-layout .features-section:focus-within {
    scroll-margin-top: 100px !important;
    padding-top: 100px !important;
  }
  
  .public-layout .features-section:not(:target) {
    scroll-margin-top: 100px !important;
  }
  
  .public-layout nav a[href="#features"] {
    scroll-behavior: smooth !important;
  }
  
  /* Reduce top margin of hero-content within features section - iPad Landscape only */
  .public-layout .features-section .hero-content {
    margin-top: -50px !important;
  }
  
  .public-layout .features-section .hero-content h2 {
    margin-top: 1.4rem !important;
  }
}

/* Additional iPad landscape coverage for different models */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
  .public-layout .features-section {
    scroll-margin-top: 100px !important;
    scroll-behavior: smooth !important;
    position: relative !important;
    z-index: 1 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
  }
  
  .public-layout .features-section[id="features"] {
    scroll-margin-top: 100px !important;
    scroll-padding-top: 100px !important;
  }
  
  .public-layout .features-section:target {
    scroll-margin-top: 100px !important;
    padding-top: 100px !important;
  }
  
  .public-layout .features-section:focus,
  .public-layout .features-section:active,
  .public-layout .features-section:focus-within {
    scroll-margin-top: 100px !important;
    padding-top: 100px !important;
  }
  
  .public-layout .features-section:not(:target) {
    scroll-margin-top: 100px !important;
  }
  
  .public-layout .features-section nav a[href="#features"] {
    scroll-behavior: smooth !important;
  }
  
  /* Reduce top margin of hero-content within features section - iPad Landscape only */
  .public-layout .features-section .hero-content {
    margin-top: -50px !important;
  }
  
  .public-layout .features-section .hero-content h2 {
    margin-top: 1.4rem !important;
  }
}



/* iPad-specific hero spacing fix */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .public-layout .hero-title-with-icon i {
        margin-right: 1rem !important;
        background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        opacity: 0.9;
    }
    
    /* Fix for iPad portrait - make hero title larger than subtitle */
    .public-layout .hero-title-with-icon {
        font-size: 3rem !important;
        background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    .public-layout .hero-content h2 {
        font-size: 1.8rem !important;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .public-layout .hero-title-with-icon i {
        margin-right: 1rem !important;
        background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        opacity: 0.9;
    }
    
    /* Fix for iPad landscape - make hero title text visible */
    .public-layout .hero-title-with-icon {
        background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
    }
    
    /* Fix for iPad landscape - add vertical gap between navigation buttons */
    .public-layout nav .login-btn {
        margin-bottom: 0.5rem !important;
    }
    
    .public-layout nav .signup-btn {
        margin-top: 0.5rem !important;
    }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .public-layout .hero-title-with-icon i {
        margin-right: 1rem !important;
        background: linear-gradient(135deg, var(--public-primary-color) 0%, var(--public-primary-light) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        opacity: 0.9;
    }
}

/* iPad Portrait - Center mobile menu items */
@media only screen and (min-width: 768px) and (max-width: 768px) and (orientation: portrait) {
    .public-layout nav.active {
        align-items: center !important;
        text-align: center !important;
    }
    
    .public-layout nav.active a {
        justify-content: center !important;
        text-align: center !important;
    }
    
    .public-layout nav.active a i {
        margin-right: 0.5rem !important;
    }
}

/* iPad Landscape - How It Works scroll fix */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) and (-webkit-min-device-pixel-ratio: 2) {
    .public-layout .how-it-works {
        scroll-margin-top: 100px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    .public-layout .how-it-works[id="how-it-works"] {
        scroll-margin-top: 100px !important;
        scroll-padding-top: 100px !important;
    }
    .public-layout .how-it-works:target {
        scroll-margin-top: 100px !important;
        padding-top: 100px !important;
    }
    .public-layout nav a[href="#how-it-works"] {
        scroll-behavior: smooth !important;
    }
    
    /* Ensure How It Works steps container displays properly when testimonials are remarked out */
    .public-layout .how-it-works .steps-container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 2rem !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .public-layout .how-it-works .step-card {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        background: white !important;
        color: black !important;
    }
}

/* REMOVED: iPad portrait breakpoint - consolidated into 2 breakpoints */

/* REMOVED: Small phone breakpoint - consolidated into 2 breakpoints */

/* iPad - Login button icon spacing fix */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .public-layout .public-button i {
        margin-right: 0.5rem !important;
    }
}

/* REMOVED: iPad landscape breakpoint - consolidated into 2 breakpoints */

/* REMOVED: Small phone landscape breakpoint - consolidated into 2 breakpoints */

/* iPad Landscape - Force white background on how-it-works section to prevent blue background showing through */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .public-layout .how-it-works {
        background: white !important;
        background-color: white !important;
        position: relative !important;
        z-index: 10 !important;
    }
    
    /* Force white background on specific child elements, but preserve step numbers */
    .public-layout .how-it-works .steps-container {
        background: white !important;
        background-color: white !important;
    }
    
    .public-layout .how-it-works .step {
        background: white !important;
        background-color: white !important;
    }
}

/* iPad Portrait - Ensure stat cards side-by-side */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    .public-layout .hero-stats .stat-cards-container {
        display: flex !important;
        flex-direction: row !important;
        gap: 1.5rem !important;
        justify-content: center !important;
        align-items: stretch !important;
        width: 100% !important;
        overflow: visible !important;
    }

    .public-layout .stat-card {
        flex: 1 !important;
        max-width: 42% !important;
        min-width: 180px !important;
        width: auto !important;
    }
}

/* iPad (portrait & landscape) – fallback spacing for stat cards when flex-gap isn't honoured */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .public-layout .hero-stats .stat-card {
        margin-left: 0.75rem !important;
        margin-right: 0.75rem !important;
    }
    /* Pull container edges back to keep overall width unchanged */
    .public-layout .hero-stats .stat-cards-container {
        margin-left: -0.75rem !important;
        margin-right: -0.75rem !important;
    }
}

/* iPad Landscape – DEBUG borders for ATS section */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  /* Debug borders removed */
}

/* iPad Landscape – Fix ATS demo layout (gap + prevent shrink) */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  /* Make sure flex container uses row layout */
  .public-layout .ats-demo-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: center !important;
  }

  /* Prevent the score panel from shrinking so the donut never overflows */
  .public-layout .ats-score-section {
    flex: 0 0 400px !important; /* widened by same increment again */
    max-width: 400px !important;
    min-width: 340px !important;
    padding-left: 3rem !important; /* same extra increment of padding */
    padding-right: 2.5rem !important;
  }

  /* Safari fallback when flex-gap is not supported */
  @supports not (gap: 1rem) {
    .public-layout .ats-demo-container {
      margin-left: -1.5rem !important;
      margin-right: -1.5rem !important;
    }
    .public-layout .ats-score-section,
    .public-layout .ats-explanation {
      margin-left: 1.5rem !important;
      margin-right: 1.5rem !important;
    }
  }
}

/* Ensure at least 1.5rem gap even when flex-gap ignored */
.public-layout .ats-score-section {
  margin-right: 1.5rem !important;
}
.public-layout .ats-explanation {
  margin-left: 1.5rem !important;
}

/* Shift score panel rightwards and eliminate inter-panel gap */
.public-layout .ats-score-section {
  margin-left: 2rem !important; /* pull away from left edge */
  margin-right: 0 !important;   /* align with explanation */
}
.public-layout .ats-explanation {
  margin-left: 0 !important;    /* remove gap on explanation side */
}

.public-layout .ats-explanation {
    margin-left: 2rem !important; /* add breathing space from score panel */
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 1; }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-8px) scale(1.1); }
    60% { transform: translateY(-3px) scale(1.05); }
}

/* iPad Landscape – Fix footer visibility & background */
@media only screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
  .public-layout .site-footer {
    background: var(--public-text-color) !important; /* change to black */
    color: #fff !important;
    position: relative !important;
    z-index: 50 !important;
    box-shadow: none !important;
    clip-path: none !important;
  }
  .public-layout .site-footer *,
  .public-layout .footer-section h3 {
    color: #fff !important;
    visibility: visible !important;
    opacity: 1 !important;
    font-weight: 700 !important;
  }
  /* Ensure inner footer wrappers match the black background */
  .public-layout .footer-content,
  .public-layout .footer-bottom,
  .public-layout .footer-section {
    background: var(--public-text-color) !important;
  }
  .public-layout .footer-bottom {
    border-top: none !important;
  }
}

/* iPad (portrait & landscape) – ensure footer headers are bold and proper link spacing */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .public-layout .footer-section h3 {
    font-weight: 700 !important;
  }
  
  .public-layout .footer-section a {
    margin-bottom: 0.75rem !important;
    display: block !important;
  }
}

/* Force footer headers to be bold with maximum specificity */
.public-layout .site-footer .footer-content .footer-section h3,
.public-layout .site-footer .footer-section h3,
.public-layout .footer-section h3 {
    font-weight: 700 !important;
    font-weight: bold !important;
}

/* Target footer headers by their text content to ensure bold weight */
.public-layout .footer-section h3:contains("Quick Links"),
.public-layout .footer-section h3:contains("Policies"),
.public-layout .footer-section h3:contains("Get In Touch") {
    font-weight: 700 !important;
    font-weight: bold !important;
}

/* Alternative: Force all footer section headers to be bold regardless of element type */
.public-layout .footer-section > *:first-child {
    font-weight: 700 !important;
    font-weight: bold !important;
}

/* iPad-specific footer header fix - force bold without affecting desktop */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .public-layout .site-footer .footer-content .footer-section h3,
  .public-layout .site-footer .footer-section h3,
  .public-layout .footer-section h3 {
    font-weight: 700 !important;
    font-weight: bold !important;
    font-weight: 900 !important;
  }
}

/* Aggressive iPad footer header fix - target by text content */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .public-layout .footer-section h3 {
    font-weight: 900 !important;
    font-weight: bold !important;
    font-weight: 700 !important;
    font-weight: 600 !important;
    font-weight: 500 !important;
    font-weight: 400 !important;
    font-weight: 300 !important;
    font-weight: 200 !important;
    font-weight: 100 !important;
    font-weight: 900 !important;
  }
  
  /* Target the specific text content */
  .public-layout .footer-section h3:first-child,
  .public-layout .footer-section > h3,
  .public-layout .footer-section h3 {
    font-weight: 900 !important;
    font-weight: bold !important;
    font-weight: 700 !important;
  }
}

/* Desktop – remove rounded ends on "Stop Being Filtered Out" blue bar */
@media (min-width: 992px) {
  .public-layout .stats-section-header {
    border-radius: 0 !important;
  }
}

@media (min-width: 992px) {
  .public-layout .hero-stats .stats-section-header,
  .public-layout .stats-section-header {
    border-radius: 0 !important;
  }
}

/* === HERO-STATS FULL-WIDTH FIX === */
.public-layout .hero-stats {
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  max-width: 100vw !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.public-layout .hero-stats .stat-cards-container {
  width: 100% !important;
  max-width: 95vw !important;
  margin-left: auto !important;
  margin-right: auto !important;
  margin-top: 2rem !important;
  padding: 0 1.5rem !important;
  box-sizing: border-box !important;
}

.public-layout .stat-card {
  /* Debug borders removed */
}

/* Reduce spacing when cards are stacked vertically */
@media (max-width: 768px) {
  .public-layout .hero-stats .stat-cards-container {
    margin-top: 0.25rem !important;
  }
}



/* ==== FIX: Stack layout earlier to prevent text squeezing ==== */
@media (max-width: 1200px) {
  .public-layout .ats-demo-container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 2rem !important;
    width: 100% !important;
    max-width: 95vw !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
  }
  .public-layout .ats-score-section {
    flex: 0 0 auto !important;
    max-width: 400px !important;
    width: 100% !important;
    margin-bottom: 2rem !important;
    box-sizing: border-box !important;
  }
  .public-layout .ats-explanation {
    flex: 0 0 auto !important;
    text-align: center !important;
    width: 100% !important;
    max-width: 600px !important;
    box-sizing: border-box !important;
  }
  /* Prevent key text wrapping */
  .public-layout .ats-key div {
    white-space: nowrap !important;
    flex-wrap: nowrap !important;
  }
}

@media only screen and (min-width: 768px) and (max-width: 768px) and (orientation: portrait) {
    /* FIX: prevent burger menu stretching full height */
    .public-layout nav,
    .public-layout nav.active {
        bottom: auto !important;
        height: auto !important;
    }
}

@media only screen and (min-width: 768px) and (max-width: 768px) and (orientation: portrait) {
    .public-layout .mobile-menu-overlay {
        background: rgba(0, 0, 0, 0.6) !important; /* match desktop darkness */
        backdrop-filter: blur(20px) !important;      /* slightly stronger blur */
    }
}

/* Unified overlay style across devices – no blur */
.public-layout .mobile-menu-overlay,
.public-layout .mobile-menu-overlay.active {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background: rgba(0,0,0,0.6) !important; /* consistent darkness */
}

/* Make desktop login button hover immediate (no fading) */
@media (min-width: 769px) {
  .public-layout nav .login-btn {
    transition: none !important;
  }
}

/* ==== FINAL OVERRIDES: Features grid centering & debug colors ==== */
/* Reason: later media queries set 2 or 4 columns and left-align the last card. */
@media (min-width: 769px) {
  .public-layout .features-grid {
    grid-template-columns: repeat(3, minmax(280px, 1fr)) !important;
    justify-content: center !important;
    justify-items: center !important;
    align-items: stretch !important;
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    gap: 1.25rem !important;
  }
}

@media (min-width: 992px) {
  .public-layout .features-grid {
    grid-template-columns: repeat(3, minmax(300px, 1fr)) !important;
  }
}

@media (min-width: 1200px) {
  .public-layout .features-grid {
    grid-template-columns: repeat(3, minmax(320px, 1fr)) !important;
  }
}

/* Normalize feature card height for consistent rows */
.public-layout .feature-card {
  height: 100% !important; /* ensure equal heights */
}

/* Switch to 2 columns only when really needed to prevent overflow */
@media (min-width: 769px) and (max-width: 1059px) {
  .public-layout .features-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr)) !important;
    max-width: 900px !important;
    justify-content: center !important;
    justify-items: center !important;
    gap: 1.25rem !important;
  }
}

/* SUPER FINAL OVERRIDE: Use auto-fit so the grid breaks exactly when needed */
@media (min-width: 769px) {
  .public-layout .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)) !important;
    max-width: 1150px !important;
    place-content: center !important;  /* centers grid tracks vertically/horizontally */
    place-items: stretch !important;   /* make items fill tracks to remove inner gaps */
    gap: 1.25rem !important;
  }
  /* Remove max-width on cards inside features grid so they fill their tracks */
  .public-layout .features-grid .feature-card {
    max-width: none !important;
    width: 100% !important;
  }
}

/* iPad-specific overrides */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
    .hero-headline {
        font-size: 3.2rem;
        /* iPad-specific gap fix - use margin instead of gap */
        gap: 0;
    }
    
    .hero-headline i {
        font-size: 3.2rem;
        /* Force margin-right on iPad to create space - doubled from 0.5rem to 1rem */
        margin-right: 1rem !important;
    }
    
    .hero-headline .gradient-text {
        background: linear-gradient(135deg, #1a6bc4 0%, var(--public-primary-light) 100%) !important; /* Updated to match desktop - lighter starting color */
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        color: transparent !important;
        /* iPad-specific margin fix */
        margin-left: 0;
    }
    
    /* Fix ATS features checkmark spacing on iPad */
    .public-layout .ats-features li {
        gap: 0 !important;
    }
    
    .public-layout .ats-features li i {
        margin-right: 1rem !important;
    }
}

/* Target mobile devices with high resolution but small physical screens */
@media (max-width: 1200px) and (max-height: 900px) {
    /* REMOVED: do not disable animations on small screens */
}

/* Target mobile devices in portrait mode with high resolution */
@media (max-width: 1200px) and (orientation: portrait) and (max-height: 1500px) {
    /* REMOVED: do not disable animations on mobile portrait */
}

/* Target mobile devices using aspect ratio - most mobile phones have aspect ratio > 1.5 */
@media (max-width: 1200px) and (min-aspect-ratio: 1.5) {
    /* REMOVED: do not disable animations based on aspect ratio */
}

/* Footer weights only (no layout changes) */
.public-layout .footer-section h3 { font-weight: 700 !important; }
.public-layout .footer-section a  { font-weight: 400 !important; }

/* iPad/tablet range – prevent overrides from re-bolding links */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .public-layout .site-footer * { font-weight: inherit; }
  .public-layout .footer-section h3 { font-weight: 700 !important; }
  .public-layout .footer-section a  { font-weight: 400 !important; }
}

/* Footer typography locks (no layout changes) */
.public-layout .footer-section h3 { font-weight: 700 !important; font-size: 1.2rem !important; line-height: 1.2 !important; }
.public-layout .footer-section a  { font-weight: 400 !important; font-size: 1rem !important; line-height: 1.6 !important; }

@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .public-layout .footer-section h3 { font-weight: 700 !important; font-size: 1.2rem !important; }
  .public-layout .footer-section a  { font-weight: 400 !important; font-size: 1rem !important; }
}

/* Footer final locks: enforce consistent weights/sizes at all breakpoints */
.public-layout .site-footer .footer-content .footer-section h3,
.public-layout .site-footer .footer-section h3,
.public-layout .footer-section h3 { font-weight: 700 !important; font-size: 1.2rem !important; line-height: 1.2 !important; }

.public-layout .site-footer .footer-content .footer-section a,
.public-layout .site-footer .footer-section a,
.public-layout .footer-section a { font-weight: 400 !important; font-size: 1rem !important; line-height: 1.6 !important; }

@media only screen and (max-width: 768px) {
  .public-layout .site-footer .footer-content .footer-section h3,
  .public-layout .site-footer .footer-section h3,
  .public-layout .footer-section h3 { font-weight: 700 !important; font-size: 1.2rem !important; }

  .public-layout .site-footer .footer-content .footer-section a,
  .public-layout .site-footer .footer-section a,
  .public-layout .footer-section a { font-weight: 400 !important; font-size: 1rem !important; }
}

@media only screen and (min-width: 768px) and (max-width: 1024px) {
  .public-layout .site-footer .footer-content .footer-section h3,
  .public-layout .site-footer .footer-section h3,
  .public-layout .footer-section h3 { font-weight: 700 !important; font-size: 1.2rem !important; }

  .public-layout .site-footer .footer-content .footer-section a,
  .public-layout .site-footer .footer-section a,
  .public-layout .footer-section a { font-weight: 400 !important; font-size: 1rem !important; }
}

/* Universal footer typography lock - applies everywhere without breakpoint conflicts */
.public-layout .site-footer .footer-section h3,
.public-layout .site-footer .footer-content .footer-section h3 { 
  font-weight: 700 !important; 
  font-size: 1.2rem !important; 
  line-height: 1.2 !important; 
  margin: 0 0 0.5rem 0 !important;
}

.public-layout .site-footer .footer-section a,
.public-layout .site-footer .footer-content .footer-section a { 
  font-weight: 400 !important; 
  font-size: 1rem !important; 
  line-height: 1.6 !important;
  display: block !important;
  margin-bottom: 0.5rem !important;
}






