/*
 * ViVo Finance - Professional Redesign
 * Author: Gemini AI
 */

/* === ROOT VARIABLES === */
:root {
    --primary-color: #0052D4;
    --secondary-color: #4364F7;
    --accent-color: #f0a500;
    --dark-blue: #001d3d;
    --text-color: #333;
    --light-text-color: #fff;
    --bg-light: #f8f9fa;
    --border-color: #dee2e6;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --shadow-medium: rgba(0, 0, 0, 0.12);

    --font-family: 'Montserrat', sans-serif;
    --border-radius-sm: 4px;
    --border-radius-md: 8px;
    --transition-speed: 0.3s;
}

/* === GLOBAL STYLES & RESET === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.section-title {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 60px;
    color: var(--dark-blue);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === BUTTONS === */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--border-radius-md);
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-image: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    color: var(--light-text-color);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px var(--primary-color);
    color: var(--light-text-color);
}

.btn-full {
    width: 100%;
}

.btn-special {
    background: linear-gradient(135deg, #ff8a00, #e52e71);
    color: #fff;
}

/* === HEADER & NAVIGATION === */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);
}

.header-scrolled {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--shadow-light);
}

.header-scrolled .nav-logo,
.header-scrolled .nav-links a,
.header-scrolled .burger span {
    color: var(--dark-blue) !important;
}

.header-scrolled .nav-links a:hover {
    color: var(--accent-color) !important;
}
.header-scrolled .burger span {
    background: var(--dark-blue) !important;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1300px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light-text-color);
    transition: color var(--transition-speed);
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: var(--light-text-color);
    font-size: 1rem;
    font-weight: 500;
    transition: color var(--transition-speed);
}

.nav-links a:hover {
    color: var(--accent-color);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--light-text-color);
    margin: 5px 0;
    border-radius: 3px;
    transition: all var(--transition-speed);
}

.close-btn {
    display: none;
}

/* === HERO SECTION === */
#hero {
    height: 100vh;
    background: url('../images/vivo-finance-estonia-main.webp') center/cover no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
}

.hero-content {
    position: relative;
    color: var(--light-text-color);
    max-width: 800px;
    padding: 0 20px;
    animation: fadeIn 1.5s ease-out;
}

.hero-content h1 {
    font-size: 3.8rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === SERVICES SECTION === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-block {
    position: relative;
    height: 400px;
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.service-block:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px -10px var(--shadow-medium);
}

.service-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0, 29, 61, 0.85), rgba(0, 82, 212, 0.3));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px;
    color: var(--light-text-color);
}

.service-overlay h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.service-overlay p {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.85;
}

.service-overlay a {
    color: var(--accent-color);
    font-weight: 700;
}

/* === COMPARISON & WHY US SECTION === */
.comparison-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.comparison-table-wrapper {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 4px 20px var(--shadow-light);
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.comparison-table th, .comparison-table td {
    padding: 15px 20px;
    text-align: left;
}

.comparison-table thead {
    background-image: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    color: var(--light-text-color);
}

.comparison-table tbody tr {
    border-bottom: 1px solid var(--border-color);
}

.comparison-table tbody tr:last-child {
    border-bottom: none;
}

.comparison-table tbody tr:nth-child(even) {
    background-color: var(--bg-light);
}

.comparison-table .highlight {
    font-weight: 700;
    background-color: #e7f5ff;
}

.reasons-list ul {
    list-style: none;
}

.reasons-list li {
    background-color: #fff;
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 15px var(--shadow-light);
    display: flex;
    align-items: center;
    font-weight: 500;
}

.reasons-list li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.2rem;
    margin-right: 15px;
}

/* === CREDIT CARDS SECTION === */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
}

.card {
    background: #fff;
    border-radius: var(--border-radius-md);
    box-shadow: 0 5px 25px var(--shadow-light);
    padding: 25px;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px var(--shadow-medium);
}

.card-logo {
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.card-logo img {
    max-height: 45px;
    width: auto;
}

.card p {
    font-size: 0.95rem;
    flex-grow: 1;
}

.card-details {
    margin: 15px 0;
    font-size: 0.9rem;
    color: #555;
}

.card-special {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-color));
    color: var(--light-text-color);
}
.card-special p, .card-special .card-details {
    color: var(--light-text-color);
    opacity: 0.9;
}

/* === CALCULATOR SECTION === */
.calculator-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 5px 25px var(--shadow-light);
}

.slider-container {
    margin-bottom: 25px;
}

.slider-container label {
    display: flex;
    justify-content: space-between;
    font-weight: 700;
    margin-bottom: 15px;
}

.slider-value-display {
    color: var(--primary-color);
    background: #e7f5ff;
    padding: 2px 8px;
    border-radius: var(--border-radius-sm);
}

input[type="range"] {
    width: 100%;
    -webkit-appearance: none;
    height: 8px;
    border-radius: 5px;
    background: var(--border-color);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: 3px solid #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
    transition: background var(--transition-speed);
}
input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent-color);
}

.calc-result {
    margin-top: 30px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-blue);
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--border-radius-md);
}

.loan-example {
    margin-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}

/* === APPLICATION FORM SECTION === */
.application-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.app-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.app-image-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top, rgba(0, 29, 61, 0.9), transparent);
    color: var(--light-text-color);
    font-size: 1.5rem;
    font-weight: 700;
}

.app-form-wrapper {
    background: #fff;
    padding: 40px;
    border-radius: var(--border-radius-md);
    box-shadow: 0 5px 25px var(--shadow-light);
}

.form-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-blue);
}

.form-group {
    margin-bottom: 20px;
}

.app-form input,
.app-form select,
.app-form textarea {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-family: var(--font-family);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.app-form input:focus,
.app-form select:focus,
.app-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 212, 0.2);
}

/* === FOOTER === */
.main-footer-section {
    background-color: var(--dark-blue);
    color: var(--light-text-color);
    padding: 60px 0;
    text-align: center;
}

.main-footer-section .section-title {
    color: var(--light-text-color);
}

.main-footer-section p {
    opacity: 0.8;
}

.footer-map {
    margin-top: 40px;
    border-radius: var(--border-radius-md);
    overflow: hidden;
    line-height: 0; /* Fix iframe bottom space */
}

/* === ANIMATIONS === */
.animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === RESPONSIVE DESIGN === */

/* Tablets and small laptops */
@media (max-width: 992px) {
    .section-title { font-size: 2.4rem; margin-bottom: 40px; }
    .hero-content h1 { font-size: 3rem; }

    .comparison-grid {
        grid-template-columns: 1fr;
    }
    .comparison-table {
        display: block;
        width: 100%;
    }
    .comparison-table thead { display: none; }
    .comparison-table tbody, .comparison-table tr, .comparison-table td {
        display: block;
        width: 100%;
        text-align: right;
    }
    .comparison-table tr {
        margin-bottom: 15px;
        box-shadow: 0 4px 10px var(--shadow-light);
        border-radius: var(--border-radius-sm);
    }
    .comparison-table td {
        border: none;
        border-bottom: 1px solid var(--border-color);
        position: relative;
        padding-left: 50%;
    }
    .comparison-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 15px;
        width: calc(50% - 30px);
        text-align: left;
        font-weight: 700;
        color: var(--primary-color);
    }
    .application-grid { grid-template-columns: 1fr; }
    .app-image-wrapper { max-width: 500px; margin: 0 auto 40px auto; }
}

/* Mobile devices */
@media (max-width: 768px) {
    .section { padding: 60px 0; }
    .container { padding: 0 1rem; }
    .section-title { font-size: 2rem; }
    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1.1rem; }

    .nav-links {
        position: fixed;
        top: 0; right: -100%;
        width: 80%; height: 100vh;
        background-color: #fff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right var(--transition-speed) ease-in-out;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        padding-top: 60px;
    }
    .nav-links.active {
        right: 0;
    }
    .nav-links li {
        margin: 20px 0;
    }
    .nav-links a {
        color: var(--dark-blue);
        font-size: 1.2rem;
    }
    .burger { display: flex; flex-direction: column; }
    .header-scrolled .burger span { background-color: var(--dark-blue); }

    .close-btn {
        display: block;
        position: absolute;
        top: 20px; right: 25px;
        font-size: 2.5rem;
        color: var(--dark-blue);
        cursor: pointer;
    }
    .calculator-wrapper, .app-form-wrapper { padding: 25px; }
}