:root {
    --accent-green: rgb(106, 177, 0);
    --muted-bg: rgb(247, 247, 247);
    --text-dark: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Sora', sans-serif;
}

html,
body {
    height: 100%;
}

body {
    background-color: #f7f9fc;
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* ---------- CONTAINERS & GLOBAL ---------- */
.page-max {
    width: min(95vw, 1500px);
    margin-left: auto;
    margin-right: auto;
}

/* ---------- HEADER ---------- */
header {
    position: relative;
    z-index: 100;
    padding: 18px 4vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(247, 247, 247, 0.85);
    backdrop-filter: blur(8px);
    gap: 10px;
}

header a.logo-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 16px;
}

header img {
    height: clamp(40px, 8vw, 80px);
    width: auto;
    object-fit: contain;
}

header a h1 {
    color: black;
    font-size: clamp(16px, 3.5vw, 24px);
    margin: 0;
    line-height: 1.2;
}

/* Nav Desktop */
nav {
    display: flex;
    gap: 28px;
    align-items: center;
}

nav a {
    color: var(--accent-green);
    text-decoration: none;
    font-size: clamp(14px, 1.6vw, 16px);
    position: relative;
    transition: 0.22s;
    font-weight: 500;
}

nav a:hover {
    color: green;
    font-weight: 700;
}

/* Hamburger Menu (Hidden on Desktop) */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 101;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--accent-green);
    border-radius: 2px;
    transition: 0.3s;
}

/* ---------- HOME (ANIMATION) ---------- */
.homediv {
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    margin-top: 1%;
    width: min(95vw, 1500px);
    height: min(70vh, 600px);
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.animation-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Initial Logo State */
.intro-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    transition: transform 0.2s ease, opacity 0.5s ease;
    cursor: pointer;
}

/* The Custom Mouse Cursor */
.intro-cursor {
    position: absolute;
    width: 30px;
    height: 30px;
    background-image: url('data:image/svg+xml;utf8,<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.65376 12.3673H5.46026L5.31717 12.4976L0.500002 16.8829L0.500002 1.19841L19.2751 17.48L12.3846 17.48C12.032 17.48 11.7118 17.6534 11.5222 17.9472L8.27218 22.983L5.65376 12.3673Z" fill="black" stroke="white" stroke-width="2"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 10;
    opacity: 0;
    transform-origin: top left;
}

/* Quote Text (Hidden initially) */
.quote-container {
    position: absolute;
    width: 80%;
    text-align: center;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 1s ease, transform 1s ease;
}

.quote-text {
    font-size: clamp(24px, 5vw, 42px);
    color: var(--text-dark);
    font-weight: 700;
    line-height: 1.4;
}

/* Keyframes for Cursor */
@keyframes moveCursor {
    0% {
        opacity: 1;
        top: 80%;
        left: 80%;
    }

    100% {
        opacity: 1;
        top: 50%;
        left: 50%;
    }
}

@keyframes clickCursor {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(0.8);
    }

    100% {
        transform: scale(1);
    }
}

/* ---------- SERVICES ---------- */
.servicesdiv {
    margin-top: 4vh;
    width: min(95vw, 1500px);
    margin-left: auto;
    margin-right: auto;
    padding: 20px 10px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.servicesdiv>div {
    background: blueviolet;
    height: 250px;
    width: 300px;
    flex: 1 1 250px;
    /* Grow, shrink, basis */
    max-width: 350px;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    font-weight: 600;
    padding: 16px;
    font-size: 1.2em;
    background-size: cover;
    background-position: center;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.servicesdiv>div:hover {
    transform: scale(1.05);
    z-index: 2;
}

.servicesdiv .serv1 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('Images/pollution_testing.jpg');
}

.servicesdiv .serv2 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('Images/vehicle_insurance.jpg');
}

.servicesdiv .serv3 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('Images/health_insurance.jpg');
}

.servicesdiv .serv4 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('Images/life_insurance.jpg');
}

.servicesdiv .serv5 {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('Images/general_insurance.jpg');
}

/* ---------- PLANS, BRANCH, CONTACT ---------- */
.plansdiv,
.branchdiv,
.contactdiv {
    margin-top: 8vh;
    width: min(95vw, 1500px);
    height: auto;
    min-height: auto;
    overflow: hidden;
    position: relative;
    margin-left: auto;
    margin-right: auto;
    border-radius: 18px;
    padding: 24px;
}

.plansdiv {
    background-color: rgba(247, 247, 247, 0.6);
    backdrop-filter: blur(8px);
    /* Use muted bg instead of brown */
    text-align: center;
}

.plans-title {
    color: var(--accent-green);
    font-size: clamp(24px, 4vw, 36px);
    margin-bottom: 40px;
    font-weight: 700;
}

.plans-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.plan-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 600px;
    padding: 30px;
    text-align: left;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eee;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.plan-card h3 {
    color: var(--text-dark);
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-green);
    display: inline-block;
}

.plan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.plan-table th {
    text-align: left;
    padding: 12px 8px;
    color: #666;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-table td {
    padding: 12px 8px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.plan-table tr:last-child td {
    border-bottom: none;
}

.plan-price {
    font-weight: 700;
    color: var(--text-dark);
}

.plan-total-row td {
    border-top: 2px solid #eee;
    font-weight: 800;
    color: var(--accent-green);
    font-size: 18px;
    padding-top: 15px;
}

.more-info-container {
    margin-top: 50px;
}

.more-info-btn {
    background-color: var(--text-dark);
    color: white;
    text-decoration: none;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 600;
    transition: 0.3s;
    display: inline-block;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.more-info-btn:hover {
    background-color: black;
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.branchdiv {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    /* Changed from blue */
    text-align: center;
}

.branch-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.branch-card {
    background-color: var(--muted-bg);
    border-radius: 20px;
    padding: 40px 20px;
    width: 280px;
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    border: 1px solid transparent;
}

.branch-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--accent-green);
}

.branch-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(106, 177, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-green);
    transition: 0.3s;
}

.branch-card:hover .branch-icon {
    background-color: var(--accent-green);
    color: white;
}

.branch-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.branch-card h3 {
    font-size: 20px;
    font-weight: 700;
}

.branch-card p {
    font-size: 14px;
    color: #666;
}

.contactdiv {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
}

.contact-form-container {
    background-color: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.contact-form-container h2 {
    margin-bottom: 24px;
    color: var(--accent-green);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 16px;
    transition: 0.3s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--accent-green);
}

.submit-btn {
    background-color: var(--accent-green);
    color: white;
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
}

.submit-btn:hover {
    background-color: green;
    transform: translateY(-2px);
}

/* ---------- FOOTER ---------- */
footer {
    background-color: rgba(247, 247, 247, 0.85);
    backdrop-filter: blur(8px);
    color: black;
    padding: 70px 0 20px;
    font-size: 15px;
    line-height: 1.8;
    margin-top: 80px;
    border-top: 1px solid #e5e5e5;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    padding-bottom: 40px;
    gap: 40px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

/* Branding Column */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    max-width: 300px;
}

.footer-logo-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo-row img {
    height: 50px;
    width: auto;
}

.footer-logo-row h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-dark);
}

/* Links Column */
.footer-links h4,
.footer-socials h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    color: #555;
    transition: 0.2s;
}

.footer-links a:hover {
    color: var(--accent-green);
    padding-left: 5px;
}

/* Socials Column */
.social-icons {
    display: flex;
    gap: 15px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: 0.3s;
    color: #333;
    text-decoration: none;
}

.social-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.social-icon:hover {
    transform: translateY(-3px);
    color: white;
}

.social-icon.insta:hover {
    background: #E1306C;
}

.social-icon.wa:hover {
    background: #25D366;
}

.social-icon.fb:hover {
    background: #1877F2;
}

.social-icon.yt:hover {
    background: #FF0000;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #ddd;
    font-size: 13px;
    color: #777;
}

/* ---------- RESPONSIVE BREAKPOINTS ---------- */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background-color: white;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        justify-content: center;
        transition: right 0.4s ease;
        z-index: 99;
    }

    nav.active {
        right: 0;
    }

    nav a {
        font-size: 20px;
        margin: 10px 0;
    }

    /* Hamburger animation when active */
    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }

    .homediv {
        height: 50vh;
        border-radius: 20px;
    }

    .servicesdiv>div {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .footer-section {
        justify-content: center;
        gap: 30px;
    }

    .contact-info {
        align-items: center;
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    header a h1 {
        display: none;
    }

    header a.logo-link::after {
        content: "BeSafe";
        font-size: 18px;
        font-weight: bold;
        color: black;
    }
}
