/* ================= Root ================= */
:root {
    /*--primary-color: #a4161a;*/
    /*--primary-color: #780000;*/
    --primary-color: #780000;
    --primary-hover: #a00000;
    --accent-color: #c40000;
    --text-light: #ffffff;
    --text-placeholder: #999999;
    --text-dark: #000000;
    --bg-overlay: rgba(0, 0, 0, 0.6);
    --bg-overlayspinner: rgba(0, 0, 0, 0.85);
}

/* ================= Body ================= */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    height: 100%;
    color: var(--text-light);
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

/* ================= TYPOGRAPHY ================= */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
}

/* ================= BACKGROUND ================= */
.background {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.bg-img {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1s ease;
    z-index: 0;
    pointer-events: none;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    z-index: 1;
    pointer-events: none;
}

/* ================= NAVBAR ================= */

.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;   /* 👈 important fix */
    z-index: 20;
}

/* Logo */
.logo {
    font-size: 20px;   /* 👈 reduce from 24 */
    font-weight: bold;
    cursor: pointer;
}

/* Logo Image */
.logo img {
    width: 60px;
    height: 60px;
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
}

/* Menu container */
.menu {
    display: flex;
    align-items: center;
    height: 48px;   /* 👈 restore proper height */
}

/* Menu items */
.menu a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    text-decoration: none;
    color: var(--text-light);
    position: relative;
    font-size: 18px;
    transition: 0.3s;
}

/* Icons inside menu */
.menu a img {
    width: 24px;
    height: 24px;
    margin-right: 6px;
}

/* Hover */
.menu a:hover {
    color: var(--accent-color);
}

/* Active */
.menu a.active {
    color: var(--accent-color);
}

/* Underline only for active */
.menu a.active::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    left: 0;
    bottom: -5px;
}

.app-footer {
    position: fixed;
    bottom: 10px;
    right: 20px;
    color: #aaa;
    font-size: 12px;
    font-family: 'Poppins', sans-serif;
    z-index: 40;
}

/* ================= CONTENT ================= */
.content {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    padding: 20px;
}

/* ================= HERO ================= */
.hero-left {
    position: absolute;
    bottom: 8%;
    left: 5%;
    width: 45%;
    z-index: 2;
    color: var(--text-light);
    transition: 0.3s;
}

.hero-text h1 {
    font-size: 40px;
    margin-bottom: 20px;
    text-align: left;
}

.hero-text p {
    font-size: 18px;
    opacity: 0.8;
    text-align: left;
}

/* CTA */
.hero-cta {
    margin-top: 40px;
    text-align: left;
}

.hero-cta h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.hero-cta .btn {
    display: block;
    width: fit-content;
    text-align: left;
}

/* ================= BUTTON ================= */
.btn {
    padding: 12px 28px;
    background: var(--primary-color);
    color: var(--text-light);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn:hover {
    background: var(--text-light);
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn.btn-disabled,
.btn.btn-disabled:hover {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: auto;
    background: #7f7f7f;
    color: var(--text-light);
    transform: none;
}

/* ================= PLANS ================= */
.plans-container {
    z-index: 2;
    display: flex;
    flex-direction: column;
    position: relative;
    text-align: center;
    align-items: center;
    justify-content: center;
    margin-top: 60px;
}

.plans-title {
    font-size: 38px;
    margin-top: 0px;
    margin-bottom: 20px;
}

/* Grid */
.plans-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

/* Card */
.plan-card {
    background: var(--text-light);
    color: black;
    padding: 30px;
    border-radius: 15px;
    width: 350px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
}

.plan-card:hover {
    transform: scale(1.05);
}

/* Selected State */
.plan-card.selected {
    background: var(--primary-color);
    color: var(--text-light);
}

/* Select Text */
.select-text {
    margin-top: 20px;
    font-weight: bold;
    font-size: 16px;
}

.plan-card .btn {
    margin-top: 20px;
    display: none;
}

.plan-card.selected .btn {
    display: inline-block;
    background: var(--text-light);
    color: var(--primary-color);
}

/* Price */
.price {
    font-size: 40px;
    font-weight: bold;
    margin: 15px 0;
}

.duration {
    font-size: 18px;
    margin-bottom: 10px;
}

/* Description */
.desc {
    font-size: 14px;
    margin-bottom: 15px;
}

/* Features */
.plan-card ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.plan-card ul li {
    margin: 10px 0;
}

/* Button */
.plan-btn {
    padding: 10px 20px;
    border: none;
    background: black;
    color: var(--text-light);
    border-radius: 5px;
    cursor: pointer;
}

.plan-card.highlight .plan-btn {
    background: var(--text-light);
    color: black;
}

.plan-btn:hover {
    opacity: 0.8;
}

/* ================= FORM ================= */
.form-container {
    display: none;
    margin-top: 10px;
    margin-bottom: 40px;
    width: 520px;
    background: rgba(255,255,255,0.05);
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(25px);
}

.form-container h2 {
    margin-top: 0px;
    margin-bottom: 20px;
}

.form-container .btn {
    margin-top: 20px;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 15px;
    border-radius: 6px;
    display: block;
}

/* Inputs */
.form-container input {
    padding: 12px;
    width: 80%;
    margin-bottom: 15px;
    border-radius: 6px;
    border: none;
    outline: none;
}

/* Full width button */
.full-width {
    width: 100%;
}

.input-group {
    position: relative;
    margin-bottom: 15px;
}

.input-group input {
    width: 80%;
    padding: 12px 40px 12px 12px; /* space for icon */
    border-radius: 6px;
    border: 1px solid #ccc;
    font-family: 'Poppins', 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-dark);
}

/* Placeholder styling */
.input-group input::placeholder {
    font-family: 'Poppins', 'Montserrat', sans-serif;
    font-size: 14px;
    color: #aaa;
    font-weight: 400;
    color: var(--text-placeholder);
}

.input-group input:focus {
    outline: none;
    border-color: #780000;
    box-shadow: 0 0 6px rgba(120, 0, 0, 0.4);
}

/* Icon inside input */
.input-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-70%);
    font-size: 16px;
}

/* States */
.input-error {
    border: 1px solid #ff4d4d;
}

.input-success {
    border: 1px solid #00cc88;
}

/* ================= RESULT PAGE ================= */
.result-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.result-card {
    margin-top: 20px;
    margin-bottom: 40px;
    width: 520px;
    background: rgba(255,255,255,0.05);
    padding: 25px;
    border-radius: 12px;
    backdrop-filter: blur(25px);
}

.result-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
}

.row span {
    font-weight: bold;
}

.success {
    color: #00ffcc;
}

.error {
    color: #ff4d4d;
}

.error-box {
    margin-top: 15px;
    padding: 10px;
    background: rgba(255,0,0,0.2);
    border-radius: 6px;
}

/* FULL SCREEN LOADER */
.loader-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;

    background: rgba(0, 0, 0, 0.85);
    z-index: 9999;

    display: flex;
    justify-content: center;
    align-items: center;

    visibility: hidden;
    opacity: 0;
    pointer-events: none;

    transition: opacity 0.3s ease;
}

.loader-overlay.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #ccc;
    border-top: 5px solid #780000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ================= ANIMATION ================= */
.plan-card,
.form-container {
    animation: fadeIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1024px) {
    .hero-left {
        width: min(60%, 560px);
    }

    .plans-grid {
        gap: 24px;
    }

    .plan-card {
        width: min(100%, 320px);
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 18px 20px;
        flex-wrap: wrap;
        gap: 14px;
    }

    .logo {
        font-size: 18px;
    }

    .logo img {
        width: 52px;
        height: 52px;
    }

    .menu {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        height: auto;
        gap: 8px;
    }

    .menu a {
        height: auto;
        min-height: 40px;
        padding: 8px 12px;
        font-size: 16px;
    }

    .menu a.active::after {
        bottom: 0;
    }

    .content {
        padding: 24px 16px 40px;
    }

    .hero-left {
        position: relative;
        left: auto;
        right: auto;
        bottom: auto;
        width: 100%;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        align-items: center;
        padding: 140px 0 56px;
        text-align: center;
    }

    .hero-text h1,
    .hero-text p,
    .hero-cta,
    .hero-cta .btn {
        text-align: center;
    }

    .hero-text h1 {
        font-size: 34px;
        margin-bottom: 16px;
    }

    .hero-text p {
        font-size: 16px;
    }

    .hero-cta {
        margin-top: 28px;
    }

    .hero-cta h2 {
        font-size: 22px;
        margin-bottom: 16px;
    }

    .hero-cta .btn {
        margin-left: auto;
        margin-right: auto;
    }

    .plans-container {
        margin-top: 110px;
    }

    .plans-title {
        font-size: 32px;
    }

    .plans-grid {
        width: 100%;
        gap: 20px;
    }

    .plan-card,
    .form-container,
    .result-card {
        width: 100%;
        max-width: 520px;
    }

    .form-container {
        padding: 22px 18px;
    }

    .form-container .btn,
    .form-container input,
    .input-group input {
        width: 100%;
    }

    .input-icon {
        right: 14px;
    }

    .result-container {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    .result-actions {
        width: 100%;
    }

    .row {
        gap: 8px;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .navbar {
        padding: 16px 14px;
    }

    .logo {
        width: 100%;
        justify-content: center;
    }

    .menu {
        gap: 6px;
    }

    .menu a {
        flex: 1 1 auto;
        justify-content: center;
        padding: 8px 10px;
        font-size: 15px;
    }

    .menu a img {
        width: 20px;
        height: 20px;
        margin-right: 5px;
    }

    .app-footer {
        right: 12px;
        bottom: 8px;
        font-size: 11px;
    }

    .hero-left {
        padding-top: 152px;
        padding-bottom: 44px;
    }

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

    .hero-text p {
        font-size: 15px;
    }

    .hero-cta h2 {
        font-size: 20px;
    }

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

    .plans-container {
        margin-top: 120px;
    }

    .plans-title {
        font-size: 28px;
    }

    .plan-card {
        padding: 24px 18px;
    }

    .price {
        font-size: 34px;
    }

    .form-container,
    .result-card {
        padding: 20px 16px;
    }

    .result-actions {
        gap: 12px;
    }

    .row {
        flex-direction: column;
        align-items: flex-start;
    }
}
