/* Reset default styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

/* General body styling */
body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9faff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Navigation Bar */
.navbar {
    background: linear-gradient(90deg, rgba(29, 78, 216, 0.95), rgba(59, 130, 246, 0.95));
    backdrop-filter: blur(12px);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    transition: background 0.3s ease, padding 0.3s ease;
}

.navbar.scrolled {
    background: linear-gradient(90deg, rgba(29, 78, 216, 1), rgba(59, 130, 246, 1));
}

.logo-img {
    height: 90px;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-links li {
    position: relative;
}

.nav-links li:before {
    content: none !important;
}

.nav-links li a {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    position: relative;
    transition: color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: #facc15;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after {
    width: 50%;
}

.nav-links li a:hover {
    color: #facc15;
    transform: translateY(-2px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.nav-cta {
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #1e3a8a !important;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(250, 204, 21, 0.4);
}

/* Hamburger Menu for Mobile */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 8px;
    cursor: pointer;
    z-index: 101;
    padding: 15px;
    touch-action: manipulation;
}

.nav-toggle .bar {
    width: 40px;
    height: 5px;
    background-color: #ffffff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

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

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile-specific adjustments */
@media screen and (max-width: 768px) {
    .navbar {
        padding: 0.5rem 1rem; /* Reduced padding */
        min-height: 50px; /* Smaller height */
    }

    .nav-toggle {
        display: flex;
    }

    .logo-img {
        height: 40px; /* Smaller logo */
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 50px; /* Match reduced navbar height */
        left: 0;
        width: 100%;
        flex-direction: column;
        background: linear-gradient(90deg, rgba(29, 78, 216, 0.95), rgba(59, 130, 246, 0.95));
        padding: 1rem 0;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
        z-index: 100;
        max-height: calc(100vh - 50px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
        margin: 0.3rem 0;
    }

    .nav-links li a {
        display: block;
        padding: 1rem;
        font-size: 0.9rem; /* Smaller text */
    }

    .nav-cta {
        margin: 0.3rem 0;
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    header {
        margin-top: 50px; /* Match navbar */
    }
}

/* Hero Section */
header {
    background: linear-gradient(135deg, #1e3a8a, #22d3ee);
    color: white;
    text-align: center;
    padding: 7rem 1rem;
    position: relative;
    margin-top: 90px;
    width: 100%;
    overflow: hidden;
}

.hero-container {
    max-width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
}

.hero-container h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    word-break: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.tagline {
    font-size: 1.6rem;
    font-weight: 400;
    margin-bottom: 1rem;
    opacity: 0.9;
    word-break: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.hero-container p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    word-break: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 1.2rem 3rem;
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #1e3a8a;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.2rem;
    border-radius: 50px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(250, 204, 21, 0.4);
}

/* Responsive Hero Adjustments */
@media screen and (max-width: 768px) {
    header {
        padding: 2.5rem 0.5rem; /* Tighter padding */
        margin-top: 50px;
    }

    .hero-container h1 {
        font-size: 1.5rem; /* Much smaller */
        line-height: 1.2;
    }

    .tagline {
        font-size: 0.9rem;
        line-height: 1.3;
    }

    .hero-container p {
        font-size: 0.8rem;
        line-height: 1.4;
        max-width: 100%; /* Full width */
        padding: 0 0.5rem;
    }

    .cta-button {
        padding: 0.7rem 1.5rem;
        font-size: 0.8rem;
    }
}

@media screen and (max-width: 375px) { /* Extra small screens */
    .hero-container h1 {
        font-size: 1.2rem;
    }

    .tagline {
        font-size: 0.8rem;
    }

    .hero-container p {
        font-size: 0.7rem;
    }

    .cta-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.7rem;
    }
}

/* General Section Styling */
section {
    padding: 5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

section h2 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 2rem;
    color: #1e3a8a;
    text-align: center;
}

section p, section ul {
    font-size: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Why CareCoin Section */
.why-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.why-item {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.why-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.why-item h3 {
    font-size: 1.5rem;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.why-item p {
    font-size: 1rem;
    color: #666;
}

/* How It Works */
.how-it-works-container {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.step {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    width: 350px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.step h3 {
    color: #22d3ee;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Benefits */
.benefits-container {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
}

.benefit-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 400px;
    text-align: center;
}

.benefit-card h3 {
    font-size: 1.8rem;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

/* Lists */
ul {
    list-style: none;
}

/* Apply checkmarks only to specific sections, not the navbar */
section ul li {
    margin: 1.5rem 0;
    position: relative;
    font-size: 1.2rem;
}

section ul li:before {
    content: "✔";
    color: #1e3a8a;
    margin-right: 12px;
}

/* Join Now Section */
.cta-container {
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 3rem;
}

.cta-card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
    width: 400px;
    text-align: center;
    transition: transform 0.3s ease;
}

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

.cta-card h3 {
    font-size: 1.8rem;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.cta-card p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Sign-Up Section */
.signup-section {
    background: linear-gradient(135deg, #f9faff, #e0f7fa);
    padding: 5rem 2rem;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.signup-container {
    background-color: #ffffff;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.signup-container h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e3a8a;
    margin-bottom: 1rem;
}

.signup-subtext {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.signup-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a8a;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #1e3a8a;
    box-shadow: 0 0 5px rgba(30, 58, 138, 0.3);
    outline: none;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

/* Error message styling */
.error {
    color: #dc2626;
    font-size: 0.9rem;
    margin-top: 0.3rem;
    display: none;
}

/* Submit Button */
.submit-btn {
    background: linear-gradient(135deg, #facc15, #eab308);
    color: #1e3a8a;
    padding: 1rem;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(250, 204, 21, 0.4);
}

/* Footer */
footer {
    background: linear-gradient(90deg, #2e529f, #3b82f6);
    color: white;
    text-align: center;
    padding: 3rem 2rem;
    margin-top: 3rem;
    box-shadow: 0 -6px 15px rgba(0, 0, 0, 0.1);
}

footer a {
    color: #facc15;
    text-decoration: none;
    margin: 0 10px;
    font-weight: 600;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #eab308;
    text-decoration: underline;
}

footer p {
    margin: 1.5rem 0;
    font-size: 1.1rem;
    color: #fff;
    font-weight: 400;
}