/* ========================================
   Cash Calculator - Main Stylesheet
   Modern White/Cream Design with Blue Accents
   ======================================== */

/* === CSS Variables === */
:root {
    --primary-blue: #2563eb;
    --primary-blue-dark: #1e40af;
    --primary-blue-light: #3b82f6;
    --cream-bg: #fffbf5;
    --white: #ffffff;
    --text-dark: #1f2937;
    --text-gray: #6b7280;
    --text-light: #9ca3af;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s ease;
}

/* === Reset & Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--cream-bg);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    scroll-behavior: smooth;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-dark);
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-blue-dark);
}

/* === Container === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER STYLES
   ======================================== */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    cursor: pointer;
}

.logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-menu a:hover {
    background-color: var(--cream-bg);
    color: var(--primary-blue);
}

.nav-menu a.active {
    background-color: var(--primary-blue);
    color: var(--white);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-dark);
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    z-index: 999;
}

.mobile-menu.active {
    display: flex;
    flex-direction: column;
}

.mobile-menu a {
    padding: 1rem 1.5rem;
    color: var(--text-dark);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background-color: var(--cream-bg);
    color: var(--primary-blue);
}

/* ========================================
   MAIN CONTENT STYLES
   ======================================== */
.main-content {
    flex: 1;
    padding: 3rem 0;
}

/* Hero Section */
.hero-section {
    text-align: center;
    margin-bottom: 3rem;
}

.main-title {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Section Box */
.section-box {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
    border-bottom: 3px solid var(--primary-blue);
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* ========================================
   CALCULATOR TABLE STYLES
   ======================================== */
.calculator-table {
    margin-bottom: 2rem;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr;
    gap: 1rem;
    padding: 1rem;
    background-color: var(--primary-blue);
    color: var(--white);
    border-radius: 8px 8px 0 0;
    font-weight: 600;
    text-align: center;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    transition: var(--transition);
}

.table-row:hover {
    background-color: var(--cream-bg);
}

.col-denomination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
    justify-content: center;
}

.currency-icon {
    color: var(--primary-blue);
    font-size: 1.2rem;
}

.denomination-value {
    font-size: 1.1rem;
}

.col-quantity {
    display: flex;
    justify-content: center;
}

.quantity-input {
    width: 100%;
    max-width: 150px;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
    transition: var(--transition);
    font-family: var(--font-family);
}

.quantity-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.col-amount {
    text-align: center;
}

.amount-value {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary-blue);
}

/* ========================================
   GRAND TOTAL BOX
   ======================================== */
.grand-total-box {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
}

.total-label {
    font-size: 1.5rem;
    font-weight: 600;
}

.total-value {
    font-size: 2.5rem;
    font-weight: 700;
}

/* ========================================
   DATE & TIME BOX
   ======================================== */
.datetime-box {
    text-align: center;
    padding: 1rem;
    background-color: var(--cream-bg);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-gray);
    font-size: 1rem;
}

.datetime-box i {
    font-size: 1.2rem;
}

/* ========================================
   ACTION BUTTONS
   ======================================== */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-family: var(--font-family);
}

.btn i {
    font-size: 1.1rem;
}

.btn-reset {
    background-color: #ef4444;
    color: var(--white);
}

.btn-reset:hover {
    background-color: #dc2626;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-print {
    background-color: #10b981;
    color: var(--white);
}

.btn-print:hover {
    background-color: #059669;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-pdf {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-pdf:hover {
    background-color: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-submit {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-submit:hover {
    background-color: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   HOW TO USE SECTION
   ======================================== */
.how-to-section {
    margin-top: 3rem;
}

.instructions-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.instruction-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.instruction-number {
    min-width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.instruction-text h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.instruction-text p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* ========================================
   ABOUT PAGE STYLES
   ======================================== */
.page-section {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    text-align: center;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-intro .intro-text {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-gray);
}

.section-subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background-color: var(--cream-bg);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-gray);
    line-height: 1.6;
}

.about-purpose p,
.about-commitment p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.users-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.user-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem;
    background-color: var(--cream-bg);
    border-radius: 8px;
}

.user-item i {
    font-size: 2rem;
    color: var(--primary-blue);
    min-width: 40px;
}

.user-item h4 {
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.user-item p {
    color: var(--text-gray);
    line-height: 1.6;
}

/* ========================================
   CONTACT PAGE STYLES
   ======================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.contact-form-section,
.contact-info-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: var(--text-dark);
}

.required {
    color: #ef4444;
}

.form-input,
.form-textarea {
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-family);
    transition: var(--transition);
    width: 100%;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.form-success-message {
    display: none;
    padding: 1rem;
    background-color: #d1fae5;
    color: #065f46;
    border-radius: 8px;
    border-left: 4px solid #10b981;
    margin-top: 1rem;
}

.form-success-message.show {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-success-message i {
    font-size: 1.5rem;
}

/* Contact Info */
.contact-info-box {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-light) 100%);
    color: var(--white);
}

.contact-info-box .section-title {
    color: var(--white);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.contact-info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.info-content h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.info-content p {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
}

.info-content a {
    color: var(--white);
    text-decoration: underline;
}

.info-content a:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* Contact Tips */
.contact-tips-box {
    background-color: var(--cream-bg);
}

.tips-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

.tips-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tips-list li {
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-gray);
}

.tips-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: bold;
}

/* ========================================
   LEGAL PAGES STYLES
   ======================================== */
.last-updated {
    color: var(--text-gray);
    font-style: italic;
    margin-bottom: 2rem;
}

.legal-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.legal-section {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-section:last-child {
    border-bottom: none;
}

.legal-section h2 {
    font-size: 1.375rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.legal-section h3 {
    font-size: 1.125rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-dark);
}

.legal-section p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.legal-section ul {
    margin-left: 1.5rem;
    color: var(--text-gray);
    line-height: 1.8;
}

.legal-section ul li {
    margin-bottom: 0.5rem;
}

.contact-email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    margin-top: 1rem;
}

.disclaimer-notice {
    background-color: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.notice-icon {
    font-size: 2rem;
    color: #f59e0b;
    flex-shrink: 0;
}

.acceptance-section {
    background-color: var(--cream-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--primary-blue);
}

.acceptance-text {
    color: var(--text-dark);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* ========================================
   FOOTER STYLES
   ======================================== */
.footer {
    background-color: var(--text-dark);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-heading {
    border-bottom: 2px solid var(--primary-blue);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
}

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .header,
    .footer,
    .mobile-menu,
    .action-buttons,
    .how-to-section {
        display: none !important;
    }

    body {
        background-color: white;
    }

    .section-box {
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .grand-total-box {
        background: #2563eb !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

/* Tablets (768px and below) */
@media screen and (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-title {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .table-header {
        grid-template-columns: 1fr 1fr 1fr;
        font-size: 0.875rem;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .table-row {
        grid-template-columns: 1fr 1fr 1fr;
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .denomination-value {
        font-size: 1rem;
    }

    .quantity-input {
        max-width: 100%;
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .amount-value {
        font-size: 1rem;
    }

    .grand-total-box {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .total-label {
        font-size: 1.25rem;
    }

    .total-value {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

    .instruction-item {
        gap: 1rem;
    }

    .instruction-number {
        min-width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }
}

/* Mobile (480px and below) */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .main-title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .section-box {
        padding: 1.5rem;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .table-header,
    .table-row {
        grid-template-columns: 1fr 1fr 1fr;
        font-size: 0.8rem;
    }

    .col-denomination {
        font-size: 0.875rem;
    }

    .currency-icon {
        font-size: 1rem;
    }

    .total-value {
        font-size: 1.75rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .feature-card,
    .user-item {
        padding: 1rem;
    }
}

/* Large Screens (1200px and above) */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
}
