/* Passport Photo Maker - Main Stylesheet */

/* ====== Base Styles ====== */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --success-color: #2ecc71;
    --warning-color: #f39c12;
    --error-color: #e74c3c;
    --border-radius: 4px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: #f8f9fa;
}

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

a:hover {
    color: #217dbb;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ====== Header Styles ====== */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-menu li {
    margin-left: 20px;
}

.nav-menu a {
    color: var(--dark-color);
    font-weight: 500;
}

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

/* ====== Hero Section ====== */
.hero-section {
    background: linear-gradient(135deg, #3498db, #8e44ad);
    color: white;
    text-align: center;
    padding: 80px 0;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.hero-section .lead {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px;
}

.cta-buttons {
    margin-top: 30px;
}

/* ====== Button Styles ====== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    margin: 0 10px;
}

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

.btn-primary:hover {
    background-color: #217dbb;
}

.btn-secondary {
    background-color: var(--light-color); /* Light background */
    border: 2px solid var(--dark-color); /* Dark border */
    color: var(--dark-color); /* Dark text */
}

.btn-secondary:hover {
    background-color: var(--dark-color); /* Dark background on hover */
    color: white; /* White text on hover */
}

/* ====== Tool Interface ====== */
.tool-interface-section {
    display: none;
    padding: 60px 0;
    background: #f8f9fa;
}

.tool-interface-section.active {
    display: block;
}

.tool-container {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    margin-bottom: 40px;
    padding: 30px;
    display: none;
}

.tool-container.active {
    display: block;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.step {
    flex: 1;
    text-align: center;
    padding: 15px;
    position: relative;
}

.step-number {
    background-color: var(--light-color);
    color: var(--dark-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    font-weight: bold;
}

.step.active .step-number {
    background-color: var(--primary-color);
    color: white;
}

.step-title {
    font-size: 16px;
    font-weight: 500;
}

.step-content {
    display: none;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    margin: 20px 0;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.step-navigation .btn {
    min-width: 120px;
}

/* Country Selection */
.country-selection {
    max-width: 600px;
    margin: 0 auto;
}

.country-selection select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    font-size: 16px;
}

.country-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.country-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #fff;
}

.country-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.country-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.country-flag {
    font-size: 24px;
    width: 40px;
    text-align: center;
}

.country-info {
    flex: 1;
}

.country-info strong {
    display: block;
    color: #333;
    font-size: 16px;
    margin-bottom: 4px;
}

.country-info span {
    color: #666;
    font-size: 14px;
}

/* Photo Upload */
.upload-section {
    text-align: center;
    padding: 20px;
}

.upload-container {
    text-align: center;
    padding: 60px 20px;
    border: 3px dashed #667eea;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
}

.upload-container:hover {
    border-color: #5a67d8;
    background: linear-gradient(135deg, #e6f3ff 0%, #d6e9ff 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
}

.upload-container i {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
    display: block;
}

.upload-container p {
    font-size: 18px;
    color: #333;
    margin: 10px 0;
    font-weight: 500;
}

.upload-note {
    font-size: 14px !important;
    color: #666 !important;
    font-weight: 400 !important;
}

.upload-input {
    display: none;
}

/* Editor Container */
.editor-container {
    margin-top: 30px;
    display: none;
}

.editor-container.active {
    display: block;
}

.preview-container {
    margin-bottom: 20px;
}

.preview-box {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.controls-container {
    text-align: center;
}

.control-group h4 {
    color: #333;
    margin-bottom: 15px;
}

/* Photo Editor */
.editor-container {
    display: flex;
    gap: 30px;
}

/* Result */
.result-container {
    text-align: center;
}

.result-image {
    max-width: 100%;
    margin-bottom: 20px;
}

.download-options {
    margin: 30px 0;
}

.option-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.option-card {
    width: 200px;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.option-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--box-shadow);
}

.option-card.selected {
    border-color: var(--primary-color);
    background-color: rgba(52, 152, 219, 0.05);
}

.option-card img {
    width: 80px;
    height: 80px;
    margin-bottom: 10px;
}

/* ====== Features Section ====== */
.features-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 15px;
}

.section-title p {
    font-size: 1.2rem;
    color: #666;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* ====== How It Works Section ====== */
.how-it-works {
    padding: 80px 0;
    background: white;
}

.steps-timeline {
    max-width: 800px;
    margin: 0 auto;
}

.timeline-step {
    display: flex;
    align-items: center;
    margin-bottom: 50px;
    position: relative;
}

.timeline-step:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-step:nth-child(even) .timeline-content {
    text-align: right;
    padding-right: 60px;
    padding-left: 0;
}

.timeline-content {
    flex: 1;
    padding-left: 60px;
}

.timeline-content h3 {
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 15px;
}

.timeline-content p {
    color: #666;
    line-height: 1.6;
}

.timeline-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    color: white;
    position: relative;
    z-index: 2;
}

.timeline-step:not(:last-child) .timeline-number::after {
    content: '';
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 50px;
    background: #e0e0e0;
    z-index: -1;
}

/* ====== FAQ Section ====== */
.faq-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.faq-question {
    padding: 25px 30px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #333;
    transition: background-color 0.3s ease;
}

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

.faq-question i {
    transition: transform 0.3s ease;
    color: #667eea;
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 30px 25px;
}

.faq-answer p {
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* ====== Responsive Styles ====== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .editor-container {
        flex-direction: column;
    }

    .timeline-step {
        flex-direction: column !important;
    }

    .timeline-content {
        width: 100%;
        margin-bottom: 20px;
    }

    .steps-timeline::before {
        left: 30px;
    }

    .timeline-number {
        margin: 0 auto;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    .timeline-step {
        flex-direction: column !important;
        text-align: center;
    }
    
    .timeline-step:nth-child(even) .timeline-content {
        text-align: center;
        padding: 0;
        margin-top: 20px;
    }
    
    .timeline-content {
        padding: 0;
        margin-top: 20px;
    }
    
    .timeline-step:not(:last-child) .timeline-number::after {
        display: none;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .faq-question {
        padding: 20px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 20px 20px;
    }
}

/* Advanced Professional Interface Styles */
.customization-panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 20px;
    height: fit-content;
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 15px;
}

.tab-btn {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 13px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: center;
    min-width: 80px;
}

.tab-btn:hover {
    background: #e9ecef;
    color: #495057;
    transform: translateY(-1px);
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.tab-btn i {
    font-size: 14px;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Size Options */
.size-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.size-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.size-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.size-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 100%);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.size-preview {
    width: 40px;
    height: 40px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    position: relative;
}

.size-preview::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #667eea;
    border-radius: 2px;
}

.us-size::after { width: 30px; height: 30px; }
.uk-size::after { width: 25px; height: 32px; }
.india-size::after { width: 28px; height: 28px; }

.size-info {
    flex: 1;
}

.size-info strong {
    display: block;
    color: #333;
    font-size: 14px;
    margin-bottom: 2px;
}

.size-info span {
    color: #666;
    font-size: 12px;
}

/* Control Groups */
.control-group {
    margin-bottom: 20px;
}

.control-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-range {
    width: 100%;
    margin-bottom: 5px;
}

.range-value {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    min-width: 40px;
    text-align: center;
}

/* Background Sections */
.bg-section {
    margin-bottom: 20px;
}

.bg-section h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
}

/* Color Options */
.color-options {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.color-option:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.color-option.active {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

.custom-color {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 8px 8px;
    background-position: 0 0, 0 4px, 4px -4px, -4px 0px;
}

.custom-color input[type="color"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.custom-color i {
    color: #667eea;
    font-size: 16px;
}

/* Layout Options */
.layout-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.layout-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.layout-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.layout-option.active {
    border-color: #667eea;
    background: linear-gradient(135deg, #f8f9ff 0%, #e6f3ff 100%);
}

.layout-option i {
    color: #667eea;
    font-size: 18px;
    width: 20px;
    text-align: center;
}

.layout-option span {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

/* Download Buttons */
.download-buttons {
    margin-top: 20px;
}

.download-buttons .btn {
    font-weight: 500;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.download-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

/* Canvas Container */
.canvas-container {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

#passportCanvas {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Preview Comparison */
.preview-comparison {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.comparison-item {
    text-align: center;
}

.comparison-image {
    width: 120px;
    height: 120px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
    margin-bottom: 8px;
    background-size: cover;
    background-position: center;
}

.comparison-label {
    font-size: 12px;
    font-weight: 500;
    color: #666;
}

.comparison-item:last-child .comparison-label {
    color: #28a745;
}

/* Enhancement Buttons */
.enhancement-buttons .btn {
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.enhancement-buttons .btn:hover {
    transform: translateY(-1px);
}

/* Position Controls */
.position-controls {
    border-top: 1px solid #e9ecef;
    padding-top: 20px;
}

.position-controls h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 14px;
}

/* Download Section */
.download-section {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 20px;
}

.download-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.download-section h6 {
    color: #333;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tab-navigation {
        justify-content: center;
    }
    
    .tab-btn {
        min-width: 70px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .customization-panel {
        margin-top: 20px;
    }
    
    .preview-comparison {
        flex-direction: column;
        align-items: center;
    }
}
