/* Base body styles (light mode) */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
    color: #24292e;
    background-color: #ffffff;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Dark mode styling */
body.dark-mode {
    color: #c9d1d9;
    background-color: #0d1117;
}

/* Header styling */
header {
    background-color: #f6f8fa;
    border-bottom: 1px solid #d1d5da;
    padding: 1rem 0;
    color: #24292e;
}

body.dark-mode header {
    background-color: #161b22;
    color: #ffffff;
    border-bottom: 1px solid #30363d;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

header nav a {
    color: #0366d6;
    margin: 0 1rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

header nav a:hover {
    color: #005cc5;
}

body.dark-mode header nav a {
    color: #58a6ff;
}

header #toggle-dark-mode {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
}

/* Section Styling */
section {
    padding: 2rem 0;
    max-width: 800px;
    margin: 0 auto;
    color: inherit;
}

/* Footer Styling */
footer {
    background-color: #f6f8fa;
    color: #586069;
    text-align: center;
    padding: 1rem;
    border-top: 1px solid #e1e4e8;
}

body.dark-mode footer {
    background-color: #161b22;
    color: #8b949e;
    border-top: 1px solid #30363d;
}

/* Button Styling for Dark Mode */
button {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    background-color: #0366d6;
    border: none;
    color: #ffffff;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #005cc5;
}

body.dark-mode button {
    background-color: #58a6ff;
}

body.dark-mode button:hover {
    background-color: #1f6feb;
}

#key-projects h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.project h5 {
    font-size: 1.3rem;
    font-weight: 600;
}

.project p {
    color: #586069;
}

.project ul {
    padding-left: 1rem;
}

.project ul li {
    margin-bottom: 0.5rem;
    color: #24292e;
}

/* Tag Styling */
.tag {
    display: inline-block;
    background-color: #e1e4e8;
    color: #24292e;
    padding: 0.3rem 0.6rem;
    margin: 0.2rem;
    font-size: 0.875rem;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode .tag {
    background-color: #30363d;
    color: #c9d1d9;
}

.tag:hover {
    background-color: #0366d6;
    color: #ffffff;
}

body.dark-mode .tag:hover {
    background-color: #58a6ff;
    color: #0d1117;
}

/* Unordered List Styling */
ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: 1rem;
}

ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: #24292e;
}

/* Custom Bullet Icon */
ul li::before {
    content: '•'; /* Can also use custom icons here */
    position: absolute;
    left: 0;
    color: #0366d6; /* Bullet color */
    font-size: 1.2rem;
    line-height: 1;
}

body.dark-mode ul li {
    color: #c9d1d9;
}

body.dark-mode ul li::before {
    color: #58a6ff;
}

/* Standard Section Header Styling */
section h2 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: left; /* Ensure alignment with other sections */
}

/* Services Section */
.services-intro {
    color: #586069;
    max-width: 760px;
    margin-bottom: 1.5rem;
}

body.dark-mode .services-intro {
    color: #8b949e;
}

.services-intro a {
    color: #0366d6;
    text-decoration: none;
}

body.dark-mode .services-intro a {
    color: #58a6ff;
}

/* Currency switcher */
.currency-label {
    font-size: 0.9rem;
    color: #586069;
}

body.dark-mode .currency-label {
    color: #8b949e;
}

.currency-select {
    background-color: #ffffff;
    border: 1px solid #d1d5da;
    color: #24292e;
    padding: 0.35rem 0.75rem;
    font-size: 0.9rem;
    border-radius: 6px;
    cursor: pointer;
}

.currency-select:focus {
    outline: none;
    border-color: #0366d6;
    box-shadow: 0 0 0 2px rgba(3, 102, 214, 0.25);
}

body.dark-mode .currency-select {
    background-color: #0d1117;
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-mode .currency-select:focus {
    border-color: #58a6ff;
    box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.25);
}

/* Service cards */
.service-card {
    background-color: #f6f8fa;
    border: 1px solid #d1d5da;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(27, 31, 35, 0.08);
    border-color: #0366d6;
}

body.dark-mode .service-card {
    background-color: #161b22;
    border-color: #30363d;
}

body.dark-mode .service-card:hover {
    border-color: #58a6ff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.service-icon {
    font-size: 1.8rem;
    color: #0366d6;
}

body.dark-mode .service-icon {
    color: #58a6ff;
}

.service-card h5 {
    font-size: 1.15rem;
    font-weight: 600;
}

.service-desc {
    color: #586069;
    font-size: 0.95rem;
    line-height: 1.5;
}

body.dark-mode .service-desc {
    color: #8b949e;
}

.service-price {
    font-size: 0.95rem;
    color: #586069;
    margin-top: 0.5rem;
    font-weight: 500;
}

.service-price .price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0366d6;
}

.service-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #25d366;
    text-decoration: none;
    transition: color 0.2s ease;
}

.service-whatsapp i {
    font-size: 1.15rem;
}

.service-whatsapp:hover {
    color: #1da851;
    text-decoration: underline;
}

body.dark-mode .service-whatsapp {
    color: #25d366;
}

body.dark-mode .service-whatsapp:hover {
    color: #4ae585;
}

/* Quote / contact form */
.quote-form {
    max-width: 640px;
}

.quote-form .form-label {
    font-weight: 500;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

body.dark-mode .quote-form .form-control,
body.dark-mode .quote-form .form-select {
    background-color: #0d1117;
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-mode .quote-form .form-control::placeholder {
    color: #6e7681;
}

body.dark-mode .quote-form .form-control:focus,
body.dark-mode .quote-form .form-select:focus {
    background-color: #0d1117;
    border-color: #58a6ff;
    color: #c9d1d9;
    box-shadow: 0 0 0 0.2rem rgba(88, 166, 255, 0.25);
}

/* WhatsApp button */
.btn-whatsapp {
    background-color: #25d366;
    border: none;
    color: #ffffff;
}

.btn-whatsapp:hover {
    background-color: #1da851;
    color: #ffffff;
}

/* Form result messages */
.qf-success {
    color: #1a7f37;
    font-weight: 600;
}

.qf-error {
    color: #cf222e;
    font-weight: 600;
}

body.dark-mode .qf-success {
    color: #3fb950;
}

body.dark-mode .qf-error {
    color: #f85149;
}

/* ===== Quote Estimator ===== */
.header-home {
    color: #24292e;
    font-weight: 600;
}

body.dark-mode .header-home {
    color: #ffffff;
}

.quote-intro {
    max-width: 640px;
    color: #586069;
}

body.dark-mode .quote-intro {
    color: #8b949e;
}

.quote-app {
    max-width: 640px;
}

/* Progress bar */
.quiz-progress {
    height: 8px;
    background-color: #e1e4e8;
    border-radius: 8px;
    overflow: hidden;
}

body.dark-mode .quiz-progress {
    background-color: #30363d;
}

.quiz-progress-bar {
    height: 100%;
    background-color: #0366d6;
    border-radius: 8px;
    transition: width 0.3s ease;
}

body.dark-mode .quiz-progress-bar {
    background-color: #58a6ff;
}

.quiz-step-label {
    font-size: 0.85rem;
    color: #586069;
}

body.dark-mode .quiz-step-label {
    color: #8b949e;
}

/* Question card */
.quiz-card {
    background-color: #f6f8fa;
    border: 1px solid #d1d5da;
    border-radius: 10px;
    padding: 1.75rem;
}

body.dark-mode .quiz-card {
    background-color: #161b22;
    border-color: #30363d;
}

/* Selectable options */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border: 1px solid #d1d5da;
    border-radius: 8px;
    background-color: #ffffff;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    margin: 0;
}

.quiz-option:hover {
    border-color: #0366d6;
}

.quiz-option input {
    accent-color: #0366d6;
    width: 1.1rem;
    height: 1.1rem;
    flex-shrink: 0;
}

.quiz-option.selected {
    border-color: #0366d6;
    background-color: #ddf4ff;
    box-shadow: inset 0 0 0 1px #0366d6;
}

body.dark-mode .quiz-option {
    background-color: #0d1117;
    border-color: #30363d;
    color: #c9d1d9;
}

body.dark-mode .quiz-option:hover {
    border-color: #58a6ff;
}

body.dark-mode .quiz-option.selected {
    border-color: #58a6ff;
    background-color: #15324f;
    box-shadow: inset 0 0 0 1px #58a6ff;
}

/* Estimate result */
.estimate-label {
    font-size: 0.95rem;
    color: #586069;
}

body.dark-mode .estimate-label {
    color: #8b949e;
}

.estimate-range {
    font-size: 2.4rem;
    font-weight: 700;
    color: #0366d6;
    line-height: 1.2;
}

body.dark-mode .estimate-range {
    color: #58a6ff;
}

.estimate-note {
    font-size: 0.9rem;
    color: #586069;
    max-width: 520px;
    margin: 0.75rem auto 0;
}

body.dark-mode .estimate-note {
    color: #8b949e;
}

.estimate-icon {
    font-size: 3rem;
    color: #1a7f37;
}

body.dark-mode .estimate-icon {
    color: #3fb950;
}

/* ===== How I Work (process) ===== */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.process-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    border: 1px solid #d1d5da;
    border-radius: 10px;
    background-color: #f6f8fa;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.process-step:hover {
    border-color: #0366d6;
    box-shadow: 0 6px 18px rgba(27, 31, 35, 0.06);
}

body.dark-mode .process-step {
    background-color: #161b22;
    border-color: #30363d;
}

body.dark-mode .process-step:hover {
    border-color: #58a6ff;
}

.process-num {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    background-color: #0366d6;
    color: #ffffff;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.dark-mode .process-num {
    background-color: #58a6ff;
    color: #0d1117;
}

.process-body h6 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.process-body p {
    font-size: 0.92rem;
    color: #586069;
    margin: 0;
}

body.dark-mode .process-body p {
    color: #8b949e;
}

/* ===== FAQ accordion (dark-mode aware) ===== */
.faq-accordion .accordion-button {
    font-weight: 600;
}

body.dark-mode .faq-accordion .accordion-item {
    background-color: #161b22;
    border-color: #30363d;
}

body.dark-mode .faq-accordion .accordion-button {
    background-color: #161b22;
    color: #c9d1d9;
}

body.dark-mode .faq-accordion .accordion-button:not(.collapsed) {
    background-color: #15324f;
    color: #58a6ff;
    box-shadow: none;
}

body.dark-mode .faq-accordion .accordion-button::after {
    filter: invert(1) grayscale(1) brightness(1.6);
}

body.dark-mode .faq-accordion .accordion-body {
    background-color: #0d1117;
    color: #c9d1d9;
}

.faq-accordion .accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(3, 102, 214, 0.2);
}

.faq-accordion .accordion-body a {
    color: #0366d6;
}

body.dark-mode .faq-accordion .accordion-body a {
    color: #58a6ff;
}

/* ===== Resources page ===== */
a.resource-card {
    color: inherit;
    text-decoration: none;
}

a.resource-card:hover {
    color: inherit;
}

/* Footer links */
footer a {
    color: #0366d6;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

body.dark-mode footer a {
    color: #58a6ff;
}

body.dark-mode .service-price {
    color: #8b949e;
}

body.dark-mode .service-price .price {
    color: #58a6ff;
}

/* Profile Container Styling */
.profile-container {
    perspective: 1000px; /* Adds depth for 3D effect */
    width: 100%;
    max-width: 250px;
    aspect-ratio: 1; /* Ensures a square container */
    overflow: hidden;
}

.profile-picture {
    backface-visibility: hidden;
    transition: transform 0.8s ease;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
}

/* Front Image (Default) */
.front-image {
    transform: rotateY(0deg);
}

/* Back Image (Hidden initially) */
.back-image {
    transform: rotateY(180deg);
}

/* Hover Effect for Coin Flip */
.profile-container:hover .front-image {
    transform: rotateY(180deg); /* Flip front image to hide */
}

.profile-container:hover .back-image {
    transform: rotateY(360deg); /* Flip back image to show */
}

/* Default Layout for Desktop */
#about .d-flex {
    display: flex;
    align-items: stretch;
}

/* Mobile Layout */
@media (max-width: 767px) {
    /* Stack elements vertically */
    #about .d-flex {
        flex-direction: column;
        align-items: center; /* Center align the content */
    }

    /* Profile Container Styling for Mobile */
    .profile-container {
        width: 80%; /* Makes the profile container take 80% of the screen width */
        padding-top: 80%; /* Keeps the container square */
        margin-bottom: 1.5rem; /* Adds space between the image and the text */
    }

    /* Adjust About Content Width */
    .about-content {
        width: 100%; /* Full width for the text content */
        text-align: center; /* Center-align text on mobile */
    }

    /* Title Styling */
    #about h2 {
        text-align: center;
        margin-bottom: 1rem;
    }
}

/* Add print styles to optimize printing */
@media print {
    /* Set a white background for the body */
    body {
        background: #fff;
        color: #000;
        font-family: 'Arial', sans-serif; /* Standard font for print */
        margin: 0; /* Remove body margins */
        padding: 0;
    }

    /* Hide navigation, buttons, footer, and images */
    header, footer, #toggle-dark-mode, .icon-links, img,
    .currency-switch, .services-cta {
        display: none !important;
    }

    /* Remove empty spaces left by hidden images */
    .profile-container, .project img, .image-container {
        display: none !important;
    }

    /* Reduce section margins for compact layout */
    section {
        page-break-inside: avoid;
        margin: 1.5cm 1cm;
        padding: 0.5cm 0; /* Reduce section padding */
    }

    /* Enhance readability of headings and text */
    section h2 {
        font-size: 20px;
        font-weight: bold;
        margin-bottom: 0.5cm;
    }

    section p, ul li {
        font-size: 12px;
        line-height: 1.4;
        margin-bottom: 0.5cm; /* Reduce spacing between paragraphs */
    }

    ul {
        padding-left: 1cm; /* Keep lists aligned neatly */
    }

    /* Remove hover and interactive styles */
    a {
        color: #000;
        text-decoration: underline;
    }

    a:hover {
        color: inherit;
    }

    /* Compact layout for project sections */
    .project {
        border: 1px solid #ccc;
        padding: 0.5cm;
        margin-bottom: 1cm;
    }
}
