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

/* Variables for easy color management */
:root {
    --primary-color: #1e3a8a; /* Navy blue - trust */
    --secondary-color: #10b981; /* Light green - friendly */
    --background-color: #fafaf9; /* Off-white - easy on eyes */
    --text-color: #1f2937; /* Dark gray - readable */
    --border-color: #e5e7eb;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --font-size-base: 18px; /* Larger for older users */
}

/* Base styles */
body {
    font-family: 'Roboto', sans-serif;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

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

/* Header styles */
.header {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    text-align: center;
    box-shadow: var(--shadow);
}

.header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main content */
.main-content {
    padding: 40px 0;
}

/* Section styles */
section {
    background: white;
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

section h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* Converter section */
.converter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-area label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

#inputText {
    width: 100%;
    min-height: 250px;
    padding: 20px;
    font-size: 1.1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    resize: vertical;
    font-family: inherit;
}

#inputText:focus {
    outline: none;
    border-color: var(--primary-color);
}

.counter {
    display: flex;
    gap: 30px;
    margin-top: 10px;
    font-size: 1rem;
    color: #6b7280;
}

.counter strong {
    color: var(--primary-color);
}

/* Buttons */
.action-buttons,
.utility-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.btn {
    padding: 15px 25px;
    font-size: 1.1rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

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

.btn-secondary {
    background-color: #6b7280;
    color: white;
}

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

.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-info {
    background-color: #3b82f6;
    color: white;
}

.icon {
    font-size: 1.3rem;
}

/* File upload */
.file-upload {
    margin-top: 20px;
}

.file-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background-color: #f3f4f6;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.file-label:hover {
    background-color: #e5e7eb;
    border-color: var(--primary-color);
}

#fileInput {
    display: none;
}

/* Products Grid */
.products-grid,
.tours-grid,
.cars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}

/* Product Card */
.product-card,
.tour-card,
.car-card {
    background: #f9fafb;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.product-card:hover,
.tour-card:hover,
.car-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.product-card img,
.tour-card img,
.car-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product-card h3,
.tour-card h3,
.car-card h3 {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.product-card a {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background-color: var(--secondary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.product-card a:hover {
    background-color: #059669;
}

/* Tour and Car specific styles */
.info-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 0.95rem;
}

.info-label {
    font-weight: 500;
    color: #6b7280;
}

.price {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin: 15px 0;
}

/* Links section */
.links-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.links-container a {
    padding: 10px 20px;
    background-color: #f3f4f6;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.links-container a:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* Modals */
.popup-modal,
.booking-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.popup-content,
.booking-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.close-popup,
.close-booking {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #6b7280;
}

.close-popup:hover,
.close-booking:hover {
    color: #000;
}

/* Form styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

#bookingItemDisplay {
    font-weight: bold;
    color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }
    
    section h2 {
        font-size: 1.5rem;
    }
    
    .action-buttons,
    .utility-buttons {
        justify-content: center;
    }
    
    .btn {
        font-size: 1rem;
        padding: 12px 20px;
    }
    
    .products-grid,
    .tours-grid,
    .cars-grid {
        grid-template-columns: 1fr;
    }
}