/* Open4Pay - Modern Financial Tools Website */

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f8fafc;
    --light-border: #e2e8f0;
    --dark-text: #1e293b;
    --light-text: #64748b;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 0.5rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: var(--dark-text);
    background-color: var(--white);
    line-height: 1.6;
    font-size: 16px;
}

/* HEADER & NAVIGATION */
header {
    background-color: var(--white);
    border-bottom: 1px solid var(--light-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

nav a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav a:hover {
    color: var(--primary-color);
}

.search-box {
    position: relative;
}

.search-box input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    width: 250px;
}

.search-box input::placeholder {
    color: var(--light-text);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: 4rem 1.5rem;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* BUTTONS */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--white);
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: transparent;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* CONTAINER & LAYOUT */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 3rem 1.5rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--dark-text);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--light-text);
    text-align: center;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* CARDS */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.card {
    background-color: var(--white);
    border: 1px solid var(--light-border);
    border-radius: calc(var(--radius) * 2);
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.card-description {
    color: var(--light-text);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.3s ease;
}

.card a:hover {
    gap: 0.75rem;
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

/* TOOL SECTION */
.tool-container {
    background-color: var(--light-bg);
    border-radius: calc(var(--radius) * 2);
    padding: 2rem;
    margin: 2rem 0;
}

.tool-input {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tool-output {
    background-color: var(--white);
    border-left: 4px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light-border);
}

.result-item:last-child {
    border-bottom: none;
}

.result-label {
    color: var(--light-text);
    font-weight: 500;
}

.result-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* FAQ SECTION */
.faq-container {
    max-width: 700px;
    margin: 2rem auto;
}

.faq-item {
    border: 1px solid var(--light-border);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1.25rem;
    background-color: var(--light-bg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--dark-text);
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f1f5f9;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 1.25rem;
    color: var(--light-text);
    background-color: var(--white);
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

/* FOOTER */
footer {
    background-color: var(--dark-text);
    color: var(--white);
    padding: 3rem 1.5rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-section li {
    margin-bottom: 0.75rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* ADS PLACEHOLDERS */
.ad-container {
    background-color: var(--light-bg);
    border: 2px dashed var(--light-border);
    border-radius: var(--radius);
    padding: 1rem;
    text-align: center;
    color: var(--light-text);
    font-size: 0.875rem;
    margin: 1.5rem 0;
}

.ad-container.header {
    margin: 1.5rem 0;
}

.ad-container.sidebar {
    margin: 1.5rem 0;
}

/* ARTICLE STYLES */
.article {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    margin-bottom: 2rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    color: var(--light-text);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.article-content h2 {
    font-size: 1.75rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.article-content h3 {
    font-size: 1.25rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark-text);
}

.article-content p {
    margin-bottom: 1rem;
    color: var(--light-text);
    line-height: 1.8;
}

.article-content ul,
.article-content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: var(--light-text);
}

/* LOADING & STATUS */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--light-border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.success-message {
    background-color: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 4px solid var(--success-color);
}

.error-message {
    background-color: #fee2e2;
    color: #7f1d1d;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 4px solid var(--danger-color);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    nav {
        gap: 1rem;
    }

    .search-box input {
        width: 150px;
    }

    .section {
        padding: 2rem 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .tool-input {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        gap: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }

    nav {
        width: 100%;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .search-box input {
        width: 100%;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* UTILITY CLASSES */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.hidden {
    display: none !important;
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}
