/* ============================================
   Free Tools - Light Theme (engl.biz Style)
   ============================================ */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #f59e0b;
    --primary-dark: #d97706;
    --secondary-color: #fb923c;
    --accent-color: #f97316;
    --text-dark: #2f343a;
    --text-light: #5f6770;
    --bg-light: #fff8eb;
    --bg-white: #ffffff;
    --border-color: #f0d7a6;
    --border: #f0d7a6;
    --bg: #ffffff;
    --bg-card: #fffdf8;
    --text: #2f343a;
    --text-muted: #5f6770;
    --primary: #f59e0b;
    --secondary: #fb923c;
    --accent: #f97316;
    --success: #10b981;
    --error: #ef4444;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* ============================================
   Header & Navigation
   ============================================ */
header {
    background: linear-gradient(135deg, #fcd34d 0%, #fb923c 100%);
    color: var(--text-dark);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

.logo img {
    height: 70px;
    width: auto;
    display: block;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo .tagline {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s;
}

.nav-links a:hover {
    opacity: 0.8;
    color: var(--text-dark);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    background: linear-gradient(135deg, #fde68a 0%, #fdba74 100%);
    color: var(--text-dark);
    padding: 5rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--text-dark);
}

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

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.65);
    color: var(--text-dark);
    border: 2px solid rgba(47, 52, 58, 0.2);
}

.btn-secondary:hover {
    background-color: white;
    color: var(--text-dark);
}

/* ============================================
   Tools Grid
   ============================================ */
.tools-section {
    padding: 5rem 0;
}

.alt-bg {
    background-color: var(--bg-light);
}

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

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.tool-card {
    background: #fffdf8;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s;
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

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

.tool-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.tool-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.tool-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    flex: 1;
}

.tool-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(245, 158, 11, 0.15);
    color: var(--primary-dark);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 1rem;
    align-self: flex-start;
}

/* ============================================
   Features Section
   ============================================ */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 5rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.feature {
    text-align: center;
    padding: 2rem;
}

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

.feature h3 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.feature p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================
   Footer
   ============================================ */
footer {
    background-color: #2f343a;
    color: #e5e7eb;
    padding: 2rem 0;
    text-align: center;
    margin-top: auto;
}

footer p {
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

footer .footer-links {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #95a5a6;
}

footer .footer-links a {
    color: #95a5a6;
    text-decoration: none;
    margin-right: 15px;
    transition: color 0.3s;
}

footer .footer-links a:hover {
    color: #e5e7eb;
}

/* ============================================
   Cookie Banner
   ============================================ */
#cookieBanner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    padding: 1.5rem;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cookie-icon {
    font-size: 2rem;
}

.cookie-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.25rem;
}

.cookie-text {
    color: var(--text-dark);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.cookie-text a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
}

.cookie-btn-accept {
    background: var(--primary-color);
    color: var(--text-dark);
}

.cookie-btn-accept:hover {
    background: var(--primary-dark);
}

.cookie-btn-necessary {
    background: var(--border-color);
    color: var(--text-dark);
}

.cookie-btn-necessary:hover {
    background: #d1d5db;
}

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

.cookie-btn-settings:hover {
    background: var(--primary-color);
    color: var(--text-dark);
}

#cookieSettings {
    display: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--bg-light);
    border-radius: 0.5rem;
}

.cookie-option-info h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-dark);
    font-size: 1rem;
}

.cookie-option-info p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.cookie-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-toggle input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.cookie-toggle input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.cookie-toggle label {
    font-size: 0.9rem;
    color: var(--text-light);
    cursor: pointer;
}

.cookie-save-btn {
    margin-top: 1rem;
}

/* ============================================
   Tool Page Nav
   ============================================ */
.tool-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 2rem;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
}

.tool-nav-brand {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tool-nav-brand img {
    height: 35px;
}

.tool-nav-back {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.tool-nav-back:hover {
    color: var(--primary-dark);
}

/* ============================================
   Tool Layout
   ============================================ */
.tool-container {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.tool-container h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.tool-container .subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.tool-layout {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.input-panel {
    flex: 1;
    min-width: 300px;
}

.output-panel {
    flex: 1;
    min-width: 300px;
}

/* ============================================
   Form Elements
   ============================================ */
label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #fffdf8;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-dark);
    font-size: 1rem;
    font-family: inherit;
    margin-bottom: 1rem;
    transition: all 0.3s;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18);
}

textarea {
    resize: vertical;
    font-family: inherit;
}

.text-area-large {
    min-height: 300px;
}

/* ============================================
   Buttons (Tool Pages)
   ============================================ */
.btn-primary-full {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: var(--text-dark);
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.btn-primary-full:hover {
    background: var(--primary-dark);
    color: white;
    transform: translateY(-1px);
}

.btn-secondary-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #fffdf8;
    color: var(--text-dark);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary-sm:hover {
    background: var(--border-color);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small:hover {
    background: var(--border-color);
    color: var(--text-dark);
}

/* ============================================
   Tabs
   ============================================ */
.tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tab {
    padding: 0.5rem 1rem;
    background: #fffdf8;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    background: var(--border-color);
}

.tab.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-dark);
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ============================================
   Stats Panel
   ============================================ */
.stats-panel {
    background: #fffdf8;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}

.stat-card {
    text-align: center;
    padding: 1rem;
    background: var(--bg-white);
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--primary-color);
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-card.highlight .stat-value {
    color: var(--text-dark);
}

.stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* ============================================
   QR Output
   ============================================ */
.qr-output {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid var(--border-color);
}

.qr-output .placeholder {
    color: var(--text-light);
}

.download-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: center;
}

/* ============================================
   Tool Info Cards
   ============================================ */
.tool-info {
    margin-top: 3rem;
}

.tool-info h3 {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.info-card {
    background: #fffdf8;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    padding: 1.5rem;
}

.info-card h4 {
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.info-card p {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ============================================
   Reading Info
   ============================================ */
.reading-info {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.reading-info h4 {
    margin-bottom: 0.75rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.reading-bar {
    height: 8px;
    background: var(--bg-light);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.reading-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.3s ease;
}

/* ============================================
   Actions
   ============================================ */
.actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        justify-content: center;
        text-align: center;
    }

    .logo img {
        height: 48px;
    }

    .header-right {
        width: 100%;
        justify-content: center;
    }

    .nav-links {
        gap: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

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

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

    .tool-container {
        padding: 1.5rem;
    }

    .tool-container h1 {
        font-size: 1.5rem;
    }

    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    #cookieBanner {
        padding: 1rem;
    }

    .cookie-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-option {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}
