/*
 * QR Designer - Improved Design
 * CSS Styles with clean professional aesthetics and consistent section layout
 */

/* Base Variables */
:root {
    --primary: #3a6df0;
    --primary-dark: #1e4fd0;
    --primary-light: #eef2ff;
    --secondary: #4f556b;
    --text-primary: #1f2937;
    --text-secondary: #4b5563;
    --text-light: #6b7280;
    --background: #f9fafb; 
    --card-bg: #ffffff;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    --border-color: #e5e7eb; 
    --input-border-color: #e0e2e7; 
    --border-focus: #3a6df0;
    --error: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --radius-sm: 6px;
    --radius-md: 8px;  
    --radius-lg: 12px; 
    --transition: all 0.2s ease;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Base Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
     scroll-behavior: smooth; /* Ensure smooth scrolling for anchor links */
     scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--card-bg); /* Main background white */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container - Handles max-width and horizontal padding */
.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

h1 {
    font-size: 2.25rem; /* 36px */
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.875rem; /* 30px */
    margin-bottom: 2rem; /* Default space below h2 */
}

/* Specific adjustment for section titles for better balance */
.main-section > .container > h2 {
    margin-bottom: 3.5rem; /* Reduced margin below section headings */
}


h3 {
    font-size: 1.125rem; /* 18px */
}

p {
    margin-bottom: 1rem;
    line-height: 1.7; /* Slightly increased line height for paragraphs */
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* Focus state for accessibility */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(58, 109, 240, 0.3); /* Use primary color for focus ring */
}
/* Remove default outline when custom focus is applied */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
   box-shadow: none;
}
/* Style for focus-visible only for keyboard users */
 a:focus-visible,
 button:focus-visible,
 input:focus-visible,
 select:focus-visible,
 textarea:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(58, 109, 240, 0.3);
 }


/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    transition: var(--transition);
    background-color: transparent;
}

.btn svg {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    stroke-width: 2;
}

.btn-primary {
    color: white;
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    color: var(--text-secondary);
    background-color: white;
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    color: var(--text-primary);
    background-color: var(--background); /* Use light background on hover */
    border-color: var(--text-secondary);
}

.btn-download {
    color: var(--primary);
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.btn-download:hover:not(:disabled) {
    background-color: var(--primary-light);
    border-color: var(--primary);
}

.btn-download:disabled {
    color: var(--text-light);
    background-color: #f1f3f4;
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-reset {
    color: var(--text-secondary);
    background-color: white;
    border: 1px solid var(--border-color);
    display: none; /* Initially hidden */
}

.btn-reset:hover {
    color: var(--text-primary);
    background-color: var(--background);
}

.btn-reset.visible {
    display: inline-flex; /* Show when needed */
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.98); /* Slightly transparent white */
    border-bottom: 1px solid var(--border-color); /* Subtle border */
    backdrop-filter: blur(5px); /* Optional: blur effect */
    -webkit-backdrop-filter: blur(5px);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    /* Padding handled by container */
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.logo img {
    width: 32px;
    height: 32px;
    margin-right: 0.5rem;
}

.main-nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2.5rem; /* Increased gap */
}

.main-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.925rem;
    position: relative;
    padding-bottom: 4px;
}

.main-nav a:hover {
    color: var(--text-primary);
}

.main-nav a.active {
    color: var(--primary);
}

/* Page Style */

.page-content {
    max-width: 1200px;
    margin: 2.5rem auto 7.5rem;
    padding: 0 1.5rem;
    font-family: 'Inter', sans-serif;
    color: #333;
    line-height: 1.6;
    width: 100%;
}

.page-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
	margin-top: 2.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.page-content h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.page-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.page-content p {
    font-size: 1rem;
    margin-bottom: 1rem;
}


/* --- List Styles --- */

.page-content ul,
.page-content ol {
    padding-left: 1.5rem;
    margin-bottom: 2rem;
}

.page-content li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.page-content th,
.page-content td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.page-content th {
    background-color: #f8f9fa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.page-content tr:nth-child(even) {
    background-color: #f2f2f2;
}

.page-content tr:hover {
    background-color: #e9ecef;
}

.page-content .last-updated {
    font-size: 0.8rem;
    font-style: italic;
    color: #666;
    margin-bottom: 2rem;
    text-align: center;
}

.page-content .page-subtitle {
    font-size: 0.9rem;
    font-style: italic;
    color: #666;
    margin-bottom: 2rem;
    text-align: center;
}

.featured-image {
  display: block;
  width: 80%;
  margin: 25px auto;
}

.footer-links a.footer-link-active {
  border-bottom: 1px solid white;
  text-decoration: none;
  padding-bottom: 5px;
}



/* Underline for active nav link */
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -1px; /* Align with header border */
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.main-nav a.active::after {
    transform: scaleX(1);
}

.mobile-menu-toggle {
    display: none; /* Hidden by default */
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background-color: var(--primary-light);
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px 0;
    background-color: var(--text-primary);
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Main Content Sections */
main {
    /* No padding here, handled by sections */
}

/* Common styles for main content sections */
.main-section {
    padding-top: 6rem;    /* Consistent vertical padding */
    padding-bottom: 8rem; /* Consistent vertical padding */
}
/* Alternate background for visual separation */
.main-section:nth-child(odd) {
     background-color: var(--card-bg); /* White */
}
.main-section:nth-child(even) {
     background-color: var(--background); /* Light gray */
}
/* Ensure first section (Create) is white */
#create {
    background-color: var(--card-bg);
}


/* App Intro (Part of Create Section) */
.app-intro {
    text-align: center;
    margin-bottom: 6rem; /* Space before QR designer */
}

.app-intro h1 {
    margin-bottom: 0.75rem;
}

.app-intro p {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-secondary);
    font-size: 1.125rem;
    line-height: 1.7; /* Increased line height */
}

/* QR Designer Layout */
.qr-designer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem; /* Increased gap between panels */
    /* margin-bottom removed, handled by section padding */
}

.qr-content-panel,
.qr-preview-panel {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden; /* Keep content contained */
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color); /* Add subtle border */
    min-height: 650px; /* Ensure roughly equal height on wider screens */
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-header h2 {
    margin: 0;
    font-size: 1.25rem; /* 20px */
    margin-bottom: 0; /* Reset margin for panel headers */
}

.panel-header-icons {
    display: flex;
    gap: 0.5rem;
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
}

.icon-button:hover {
    background-color: var(--background);
    color: var(--text-primary);
}

.icon-button.active {
    background-color: var(--primary-light);
    color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
}

.icon-button svg {
    width: 20px;
    height: 20px;
}


/* QR Types Buttons */
.qr-types {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem; /* Increased gap */
    padding: 1.5rem; /* Increased padding */
    background-color: var(--background); /* Light background */
    border-bottom: 1px solid var(--border-color);
}

.qr-type {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem; /* Adjusted padding */
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.qr-type:hover {
    border-color: var(--primary);
    color: var(--primary);
    background-color: #fdfdff; /* Subtle background hover */
}

.qr-type.active {
    background-color: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 1px var(--primary); /* Subtle ring */
}

.qr-type svg {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    stroke-width: 2;
}

.highlighted-text {
    color: #000000;
    background: linear-gradient(180deg,rgba(255,255,255,0) 50%, #dee7fc 50%);
  }
  

/* Tab Content */
.tab-content {
    display: none;
    flex-grow: 1; /* Allow tab content to fill available space */
}

.tab-content.active {
    display: flex;
    flex-direction: column;
}

/* Form Styles */
.form-container {
    padding: 1.5rem;
    flex-grow: 1; /* Allow form container to grow */
}

.content-form {
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem; /* Increased spacing */
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--card-bg);
    /* Use lighter input border */
    border: 1px solid var(--input-border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
/* Hover state for inputs */
.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--border-color);
}

/* Focus state handled globally */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--primary); /* Ensure border color changes on focus too */
    /* box-shadow is handled by global focus style */
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b5563' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 2.5rem;
}

.help-text {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem; /* Increased gap */
}

/* Password Input */
.password-input-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    color: var(--text-light);
    cursor: pointer;
}
.toggle-password:focus {
    box-shadow: none; /* Remove focus ring from inside input */
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    height: 1em; /* Align checkbox */
    width: 1em;
}
.checkbox-group input[type="checkbox"]:focus {
     box-shadow: 0 0 0 3px rgba(58, 109, 240, 0.3); /* Ensure checkbox focus is visible */
}

.checkbox-group label {
    margin-bottom: 0;
    display: inline;
    font-weight: normal; /* Normal weight for checkbox label */
}

/* Color Picker Styles */
.color-picker-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.color-picker {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
}

.color-picker::-webkit-color-swatch {
    border: none;
    border-radius: var(--radius-md);
    padding: 0;
}

.color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: var(--radius-md);
}

.color-picker::-moz-color-swatch {
    border: none;
    border-radius: var(--radius-md);
}

/* Logo Upload Styles */
.logo-upload-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 300px;
}

.logo-upload-preview {
    width: 80px;
    height: 80px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: none; /* Hide by default */
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.logo-upload-preview.visible {
    display: flex; /* Show only when a logo is present */
}

.logo-upload-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-upload-preview .remove-logo {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--error);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}

.logo-upload-preview:hover .remove-logo {
    opacity: 1;
}

/* Style for the container of the reset customization button */
.form-footer-action {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.5rem; /* Add some space above */
    height: 20px; /* Reserve space to prevent layout shift */
}

/* The new link-style button for resetting customization */
#reset-customization {
    display: none; /* Hidden by default */
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    transition: var(--transition);
}

#reset-customization.visible {
    display: inline-flex; /* Show when modifications are made */
}

#reset-customization:hover {
    color: var(--primary);
}

#reset-customization svg {
    width: 14px;
    height: 14px;
}

/* Action Buttons Container */
.action-buttons {
    padding: 1.5rem; /* Increased padding */
    border-top: 1px solid var(--border-color);
    text-align: right;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    background-color: var(--background); /* Light background */
    margin-top: auto; /* Push to bottom */
}

/* QR Display Panel */
.qr-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem; /* Increased padding */
    flex-grow: 1; /* Allow display area to grow */
}

.qr-code-container {
    width: 240px; /* Slightly larger */
    height: 240px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    padding: 1rem;
    border-radius: var(--radius-md);
    /* Softer border */
    border: 1px solid #f0f0f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Subtle inner shadow */
}

.qr-code-container img {
    max-width: 100%;
    max-height: 100%;
    display: block; /* Remove extra space below image */
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    color: var(--text-light);
}

.qr-placeholder svg {
    margin-bottom: 1rem;
    opacity: 0.5; /* Softer placeholder */
}

.qr-placeholder p {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.qr-placeholder span {
    font-size: 0.75rem;
}

.qr-details {
    text-align: center;
}

.qr-type-label {
    display: inline-block;
    padding: 0.3rem 0.8rem; /* Adjusted padding */
    background-color: var(--primary-light);
    color: var(--primary-dark);
    font-size: 0.8rem; /* Slightly larger */
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.qr-data {
    font-size: 0.875rem;
    color: var(--text-secondary);
    word-break: break-all;
    overflow-wrap: anywhere;
    white-space: pre-wrap; 
    max-width: 280px; /* Limit width */
    line-height: 1.5;
}

.download-options {
    display: flex;
    gap: 0.75rem; /* Increased gap */
    width: 100%;
    max-width: 360px; /* Wider download options */
    margin-top: 1rem; /* Add space above downloads */
}

.download-options button {
    flex: 1; /* Make buttons share space */
}

/* Scan Tips Section */
.scan-tips {
    /* margin-top: auto; Push to bottom - Handled by flex grow on qr-display */
    margin-bottom: 0;
    padding: 1.5rem; /* Increased padding */
    background-color: var(--background); /* Light background */
    border-top: 1px solid var(--border-color);
    /* Radius handled by parent panel */
}

.scan-tips h3 {
    margin-bottom: 0.75rem;
    font-size: 0.9375rem; /* 15px */
    font-weight: 600;
    color: var(--text-primary);
}

.scan-tips ul {
    list-style-type: none;
    color: var(--text-secondary);
    font-size: 0.875rem; /* 14px */
}

.scan-tips li {
    margin-bottom: 0.6rem; /* Increased spacing */
    position: relative;
    padding-left: 1.25rem;
}

.scan-tips li:before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1em; /* Slightly larger bullet */
}

.scan-tips li:last-child {
    margin-bottom: 0;
}

/* Notification */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    transform: translateY(120%); /* Start further down */
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1000;
    max-width: 320px;
}

.notification.active {
    transform: translateY(0);
    opacity: 1;
}

.notification-success {
    border-left: 4px solid var(--success);
}

.notification-error {
    border-left: 4px solid var(--error);
}

.notification-icon svg {
    width: 20px;
    height: 20px;
}

.notification-success .notification-icon { color: var(--success); }
.notification-error .notification-icon { color: var(--error); }

.notification-content p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-primary);
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(58, 109, 240, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Features Section */
.section-features {
    /* background handled by .main-section:nth-child */
    /* padding handled by .main-section */
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); /* Slightly wider min */
    gap: 2rem;
    /* margin-top removed, handled by h2 margin */
}

.feature-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color); /* Subtle border */
    /* Added shadow transition */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    /* Enhanced shadow on hover */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-light);
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem; /* More space below icon */
    color: var(--primary);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}
.feature-card h3 {
    margin-bottom: 0.5rem;
}

/* FAQ Section */
.faq-section {
    /* background handled by .main-section:nth-child */
    /* padding handled by .main-section */
    /* max-width, margin, horizontal padding removed (handled by container) */
}

.faq-section h2 {
    text-align: center;
    /* margin-bottom handled by specific rule below */
}

.faq-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 800px; /* Limit width of FAQ list for readability */
    margin-left: auto;
    margin-right: auto;
}

.faq-item {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color); /* Subtle border */
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 1.25rem 1.5rem; /* Increased horizontal padding */
    text-align: left;
    background-color: transparent; /* Use parent background */
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    color: var(--primary);
    background-color: var(--background); /* Subtle hover background */
}

.faq-question svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
    color: var(--text-secondary);
    flex-shrink: 0; /* Prevent icon shrinking */
    margin-left: 1rem;
}

.faq-item.active .faq-question svg {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out; /* Smoother transition */
}

.faq-answer-content {
    /* Increased padding */
    padding: 0 1.5rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.7; /* Increased line height */
    border-top: 1px solid var(--border-color); /* Separator line */
    margin: 0 1.5rem; /* Indent content slightly */
    padding-top: 1.5rem; /* Space above content */
}

.faq-answer-content ul {
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.faq-answer-content li {
    margin-bottom: 0.5rem;
}

.faq-item.active .faq-answer {
    max-height: 500px; /* Adjust if needed for long answers */
}

/* Blog Posts Section */
#blog {
    background-color: var(--background); /* Light gray background */
}

.blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.blog-post-card {
    background-color: var(--card-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.blog-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.blog-post-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.blog-post-content {
    padding: 1.5rem;
}

.blog-post-date {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.blog-post-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.blog-post-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.blog-view-all-container {
    text-align: center;
    margin-top: 3.5rem; /* Adds space above the button */
}

.btn-blog {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem; /* Space between text and icon */
    padding: 0.8rem 1.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--secondary);
    background-color: #d1d5db; /* Using the primary dark text color for background */
    border: 1px solid #d1d5db;
    border-radius: var(--radius-md); /* Using the site's standard medium radius */
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease; /* Using the site's standard transition */
}

.btn-blog svg {
    transition: transform 0.3s ease;
}

.btn-blog:hover {
    color: white;
	background-color: var(--text-primary); /* Using the secondary dark text color for hover */
    border-color: var(--text-primary);
    transform: translateY(-3px);
    box-shadow: var(--card-shadow); /* Using the site's standard card shadow for lift */
}

.btn-blog:hover svg {
    transform: translateX(4px);
}

/* Reusing the site's existing focus style for accessibility */
.btn-blog:focus-visible {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(58, 109, 240, 0.4);
}

/* ================================================= */
/* Pagination Styles (Sade ve Minimalist Versiyon) */
/* ================================================= */

.pagination {
    margin-top: 4rem;
    text-align: center;
}

.pagination-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem; /* 8px */
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--secondary);       
    background-color: #d1d5db;   
    border: 1px solid #d1d5db; 
    border-radius: var(--radius-md);    
    transition: var(--transition);      
    cursor: pointer;
    user-select: none;
}

.pagination-link:hover {
    color: white;
    border-color: var(--text-primary);
    background-color: var(--text-primary); 
}

.pagination-link.active {
    background-color: var(--text-primary);
    color: white;
    border-color: var(--text-primary);
    cursor: default;
}

.pagination-link.active:hover {
    color: var(--text-primary);
	background-color: var(--background);
}


.pagination-link.disabled {
    color: var(--text-light);
    background-color: var(--background);
    border-color: var(--border-color);
    cursor: not-allowed;
    opacity: 0.8;
}

.pagination-link.disabled:hover {
    color: var(--text-light);
    background-color: var(--background);
    border-color: var(--border-color);
}

/* Footer */
footer {
    background-color: #1f2937; /* Darker footer background */
    color: #d1d5db; /* Lighter text on dark background */
    border-top: 1px solid #374151; /* Darker border */
    padding: 2.5rem 0; /* Adjusted padding */
}

/* Removed .footer-content as it's no longer needed */

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
    gap: 1rem; /* Add gap for wrapping */
    width: 100%;
    /* Removed padding-top and margin-top as they are no longer needed after removing footer-content */
}

.footer-bottom p {
    color: #9ca3af; /* Slightly dimmer copyright text */
    font-size: 0.875rem;
    margin: 0;
}

.footer-links {
    display: flex;
    gap: 2rem; /* Increased gap */
}

.footer-links a {
    color: #d1d5db; /* Footer link color */
    font-size: 0.875rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: white; /* Brighter hover */
}

/* Back to Top Button Styles */
#backToTopBtn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 50px;
  height: 50px;
  border: none;
  border-radius: 50%;
  background-color: var(--primary); /* Tema rengi ile uyumlu */
  color: white;
  font-size: 20px;
  cursor: pointer;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#backToTopBtn:hover {
  background-color: var(--primary-dark); /* Tema koyu versiyonu */
  transform: translateY(-3px);
  opacity: 1 !important;
}

    #backToTopBtn.visible {
      opacity: 0.9;
      visibility: visible;
    }

    #backToTopBtn svg {
      width: 20px;
      height: 20px;
      fill: currentColor;
    }

    /* Input Validation */
    .form-group.error input,
    .form-group.error textarea,
    .form-group.error select {
        border-color: var(--error);
        box-shadow: 0 0 0 1px var(--error); /* Add subtle error ring */
    }
    .form-group.error input:focus,
    .form-group.error textarea:focus,
    .form-group.error select:focus {
         box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.4); /* Error focus ring */
    }


    .form-group .error-message {
        display: none; /* Hide error message by default */
        color: var(--error);
        font-size: 0.75rem;
        margin-top: 0.5rem;
    }
     .form-group.error .error-message {
        display: block; /* Show when error class is present */
    }

    /* Mobile Menu */
    .mobile-menu {
        display: none;
        position: absolute; /* Changed from fixed to absolute */
        top: 64px; /* Position below header */
        left: 0;
        right: 0;
        background-color: white;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 99;
        border-top: 1px solid var(--border-color);
    }

    .mobile-menu.active {
        display: block;
    }

    .mobile-menu ul {
        list-style: none;
        display: flex;
        flex-direction: column;
        gap: 0.5rem; /* Reduced gap */
    }

    .mobile-menu li {
       /* Remove padding */
    }

    .mobile-menu a {
        display: block;
        padding: 0.75rem 1rem; /* Adjusted padding */
        color: var(--text-secondary);
        font-weight: 500;
        border-radius: var(--radius-sm);
        transition: var(--transition);
    }

    .mobile-menu a:hover,
    .mobile-menu a.active {
        color: var(--primary);
        background-color: var(--primary-light);
    }

    /* Media Queries */
    @media (max-width: 1024px) {
        .qr-designer {
            grid-template-columns: 1fr; /* Stack panels */
        }

        .qr-content-panel,
        .qr-preview-panel {
            min-height: auto; /* Allow height to adjust */
        }
    }

    @media (max-width: 768px) {
        h1 { font-size: 2rem; } /* Adjust heading size */
        h2 { font-size: 1.625rem; }

        .container {
            padding-left: 1rem; /* Reduce horizontal padding */
            padding-right: 1rem;
        }

        .main-nav {
            display: none; /* Hide desktop nav */
        }

        .mobile-menu-toggle {
            display: block; /* Show mobile toggle */
        }
		
		.featured-image {
		  display: block;
		  width: 100%;
		  margin: 50px auto;
		}

        .footer-bottom {
            flex-direction: column; /* Stack footer items */
            gap: 1rem;
            text-align: center;
        }

        .footer-links {
            justify-content: center;
        }

        .main-section {
            padding-top: 6rem; /* Reduce section padding */
            padding-bottom: 8rem;
        }
        
        #customize-tab .form-row {
            grid-template-columns: 1fr;
            gap: 1rem;
        }
        
        .logo-upload-container {
            max-width: 100%;
        }
    }

    @media (max-width: 576px) {
        .form-row {
            grid-template-columns: 1fr; /* Stack form row items */
        }

        .qr-types {
            display: grid;
            grid-template-columns: 1fr 1fr; /* 2 columns for type buttons */
            gap: 0.5rem;
        }

        .download-options {
            flex-direction: column; /* Stack download buttons */
            width: 100%;
            max-width: none;
            gap: 0.5rem;
        }
        .qr-display {
            padding: 1.5rem; /* Reduce padding */
        }
        .qr-code-container {
            width: 200px; /* Smaller QR preview */
            height: 200px;
        }
         .action-buttons {
            flex-direction: column; /* Stack action buttons */
            gap: 0.5rem;
        }
        .action-buttons button {
            width: 100%; /* Full width buttons */
        }
        .btn-reset.visible {
            order: 1; /* Ensure reset is below generate */
        }
        #generate-qr {
            order: 2;
        }
		  .pagination-list {
			flex-wrap: wrap;
		  }

		  .pagination-list li {
			margin: 5px;
		  }
		}
    }
