:root {
    --primary-blue: #262f62;
    --primary-white: #ffffff;
    --accent-yellow: #fdbb2d;
    --text-color: #262f62;
    /* Updated to Blue for visibility on white */
    --font-family: 'Inter', sans-serif;
    --glass-border: rgba(38, 47, 98, 0.15);
    /* Darker border for light theme */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    /* White background with distinct "Blue Gradient Flares" for depth */
    background:
        radial-gradient(circle at 10% 20%, rgba(38, 47, 98, 0.3) 0%, transparent 50%),
        /* Stronger Deep Blue Flare */
        radial-gradient(circle at 90% 80%, rgba(0, 123, 255, 0.2) 0%, transparent 50%),
        /* Bright Blue Flare */
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0) 60%),
        #ffffff;
    background-size: cover;
    background-attachment: fixed;
    color: var(--text-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: rgba(38, 47, 98, 0.95);
    /* Keep dark blue header */
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 20px 0;
    color: white;
    /* Header text remains white */
}

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

/* Logo */
.logo-img {
    height: 40px;
    width: auto;
    display: block;
}

.nav {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    color: white;
    /* Override global blue for header */
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    position: relative;
    padding: 5px 0;
}

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

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

/* Language Switcher */
.lang-switch {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: color 0.3s;
}

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

.lang-btn:hover {
    color: white;
}

.divider {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

/* Footer */
.footer {
    margin-top: auto;
    padding: 40px 0;
    border-top: 1px solid var(--glass-border);
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.9;
    color: var(--text-color);
}

.footer p {
    margin-bottom: 5px;
    line-height: 1.5;
}

/* Sections */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 50px;
    color: var(--primary-blue);
    /* Blue title on white bg */
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* Calculator Redesign */
.input-group {
    display: none;
    animation: fadeIn 0.4s ease;
}

.input-group.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.input-box input,
.input-box select {
    width: 100%;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.4);
    /* Translucent */
    border: 1px solid rgba(38, 47, 98, 0.2);
    border-radius: 50px;
    /* Round/Pill shape */
    font-size: 1.2rem;
    /* Big font size matching old headers */
    color: var(--primary-blue);
    font-family: var(--font-family);
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.input-box input::placeholder {
    color: rgba(38, 47, 98, 0.5);
}

.input-box input:focus,
.input-box select:focus {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(38, 47, 98, 0.1);
}

.input-box.full-width {
    grid-column: span 3;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Response for grid-4 on mobile */
@media (max-width: 992px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

.centered-grid {
    justify-content: center;
}

/* Card Items (Requirements Section) */
.card-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
    /* Explicit spacing between square and text */
}

.card-item h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-blue);
}

/* Card Items - Flip Functionality */
.flip-card {
    background-color: transparent;
    height: 260px;
    /* Slightly increased to accommodate padding and content */
    perspective: 1000px;
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* Glass Effect for Front - Updated for Background Images */
.flip-card-front {
    z-index: 2;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);

    /* Center content vertically and horizontally */
    justify-content: center;
    align-items: center;
    padding: 20px;

    /* Background image setup */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Dark overlay for text readability */
.flip-card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    border-radius: 16px;
    z-index: 1;
}

/* Ensure text is above overlay */
.flip-card-front h3 {
    position: relative;
    z-index: 2;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    text-align: center;
}

/* Individual background images */
.hero-bg-1 {
    background-image: url('assets/sitoncardbox.png');
}

.hero-bg-2 {
    background-image: url('assets/closedshop.png');
}

.hero-bg-3 {
    background-image: url('assets/warehouse.png');
}

.hero-bg-4 {
    background-image: url('assets/vncreator.png');
}

/* Back of flip card */
.flip-card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    /* More opaque for text readability */
    color: var(--text-color);
    transform: rotateY(180deg);
    border: 1px solid rgba(255, 255, 255, 0.3);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 16px;

    /* Center Content vertically */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    box-sizing: border-box;
}

.flip-card-back p {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    color: var(--primary-blue);
}


.square-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    /* Standardize specific radius */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.square-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

/* Material Icons styling */
.square-icon .material-icons-round {
    font-size: 32px;
    color: inherit;
    /* Inherit from parent */
}

/* Specific coloring for white icons on blue background (Images) */
.square-icon.blue img {
    filter: brightness(0) invert(1);
    /* Forces white icon */
}

/* Exception for Flag: Keep original colors */
.square-icon.blue.flag-container img {
    filter: none;
    border-radius: 4px;
    /* Slight round for the flag rect */
}

/* Blue Square Background */
.square-icon.blue {
    background-color: #2c366f;
    color: white;
}

/* Yellow Square Background with White Icons */
.square-icon.yellow {
    background-color: var(--accent-yellow);
    color: white;
    /* Icons and text inside will be white */
}


/* Process Section */
.process-flow {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 40px;
}

.process-step {
    flex: 0 1 auto;
    min-width: 120px;
    text-align: center;
    position: relative;
    padding: 15px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(38, 47, 98, 0.1);
}

.process-step h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.process-arrow {
    width: 40px;
    height: 2px;
    background-color: var(--primary-blue);
    /* Dark arrow on white */
    position: relative;
    flex-shrink: 0;
    opacity: 0.5;
}

.process-arrow::after {
    content: '';
    position: absolute;
    right: -5px;
    /* Shift arrow head to align tip with line end */
    top: -4px;
    border-width: 5px;
    border-style: solid;
    border-color: transparent transparent transparent var(--primary-blue);
}

/* Transparent Text Section */
.transparent-section {
    text-align: center;
    background: rgba(38, 47, 98, 0.02);
    /* Very subtle blue tint */
}

/* Centered Content Helper */
.centered-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.transparent-text p,
.toggle-text-content p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.transparent-text .small-text,
.toggle-text-content .small-text {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Toggle Pill Style */
.toggle-container {
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* The Switch Container */
.switch {
    position: relative;
    width: 300px;
    /* Wide pill */
    height: 50px;
    background-color: #e0e0e0;
    border-radius: 25px;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Hide checkbox */
.switch input {
    display: none;
}

/* The Sliding Pill */
.slider {
    position: absolute;
    top: 5px;
    left: 5px;
    /* Default Left Position */
    width: 145px;
    /* Almost half */
    height: 40px;
    background-color: white;
    border-radius: 20px;
    transition: 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* Text Labels inside the Toggle Track */
.toggle-labels {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-blue);
    z-index: 2;
    pointer-events: none;
    /* Let clicks pass to switch */
}

.label-left,
.label-right {
    flex: 1;
    text-align: center;
    transition: color 0.3s;
}

/* Active State */
input:checked+.slider {
    transform: translateX(145px);
    /* Move to right */
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding-top: 20px;
    padding-bottom: 20px;
    /* Reduced from 60px */
}

.btn-primary {
    background: linear-gradient(135deg, #fdbb2d 0%, #ff8a00 100%);
    color: white;
    font-family: var(--font-family);
    font-weight: 800;
    font-size: 1.5rem;
    padding: 15px 40px;
    border: 0;
    outline: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(253, 187, 45, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(253, 187, 45, 0.5);
    background: linear-gradient(135deg, #ffc850 0%, #ff9d2e 100%);
}

/* Calculator Button Centering */
.cta-box {
    grid-column: span 3;
    text-align: center;
    margin-top: 25px;
}

/* Input Labels */
.input-label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    /* Smaller font size as requested */
    color: var(--primary-blue);
    font-weight: 600;
    margin-left: 10px;
    /* Slight indent to align with rounded input text */
}

/* Toggle Text Logic */
.toggle-text-container {
    transition: opacity 0.3s ease;
    min-height: 120px;
    /* Prevent jumpiness when switching */
}

.toggle-text-content {
    animation: fadeIn 0.4s ease;
}

/* Section Spacing Adjustments */
.hero-section {
    padding-bottom: 20px;
}

.requirements-section {
    padding-top: 20px;
    padding-bottom: 20px;
    /* Reduced from default 60px */
}

.process-section {
    padding-top: 20px;
}

/* Dual Result Tiles */
.results-explainer {
    text-align: center;
    color: var(--primary-blue);
    margin-bottom: 25px;
    font-size: 1rem;
    line-height: 1.5;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.result-tiles-wrapper {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.result-tile {
    flex: 1;
    min-width: 300px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s;
}

.result-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.tile-title {
    color: var(--primary-blue);
    margin-bottom: 15px;
    text-align: center;
    font-size: 1.3rem;
    border-bottom: 2px solid rgba(38, 47, 98, 0.1);
    padding-bottom: 10px;
}

.fee-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 15px;
    color: #555;
    font-size: 0.95rem;
}

.fee-list li {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
}

.highlight-text {
    font-weight: bold;
    color: var(--primary-blue);
}

.final-price {
    font-size: 1.1rem;
    font-weight: 800;
    color: #2c366f;
    text-align: center;
    margin-top: 10px;
}

hr {
    margin: 15px 0;
    border: 0;
    border-top: 1px solid #ddd;
}

/* Ensure results section spans full width of the grid */
.results-section {
    grid-column: span 3;
}

/* Alternative Result Box */
.result-box-alt {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: rgba(255, 248, 225, 0.6);
    /* Translucent Yellow */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(253, 187, 45, 0.4);
    border-radius: 50px;
    /* Round/Pill shape */
    box-shadow: 0 4px 20px rgba(253, 187, 45, 0.15);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Resources Section */
.resources-section {
    background: rgba(255, 255, 255, 0.5);
    /* Slight separation from transparent section */
    backdrop-filter: blur(5px);
}

.resource-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(38, 47, 98, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.resource-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.resource-icon {
    width: 50px;
    height: 50px;
    background: var(--primary-blue);
    color: white;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

/* Resource Content Wrapper */
.resource-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.resource-content h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.resource-content p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    font-size: 0.95rem;
}

.resource-link {
    color: var(--accent-yellow);
    /* Using Yellow accent for links */
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
    margin-top: auto;
    /* Push to bottom */
}

.resource-link:hover {
    color: #ff8a00;
    /* Darker orange on hover */
}