/* General Body and Font Styles */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

/* Header Styles */
header {
    background-color: #007bff; /* Primary Blue */
    color: white;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    letter-spacing: 1px;
}

header p {
    margin: 0.5rem 0;
    font-size: 1.1em;
    opacity: 0.9;
}

/* Navigation Styles */
nav ul {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Main Content Area */
main {
    padding: 20px;
    max-width: 1200px;
    margin: 20px auto;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Section Headings */
h2, h3 {
    color: #007bff;
    text-align: center;
    margin-bottom: 25px;
}

/* Button Styles */
.btn {
    display: inline-block;
    background-color: #007bff;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    text-align: center;
}

.btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-primary {
    background-color: #007bff;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d; /* Grey */
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545; /* Red */
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-tertiary {
    background-color: #17a2b8; /* Teal/Info */
    color: white;
}

.btn-tertiary:hover {
    background-color: #138496;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8em;
}

.btn-disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    color: #666666;
}

/* Form Styles */
.form-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 30px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-container h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #007bff;
}

.styled-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.styled-form input[type="text"],
.styled-form input[type="email"],
.styled-form input[type="password"],
.styled-form input[type="number"],
.styled-form input[type="tel"],
.styled-form input[type="date"],
.styled-form input[type="time"],
.styled-form textarea,
.styled-form select {
    width: calc(100% - 20px); /* Adjust for padding */
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding in width */
}

.styled-form input[type="file"] {
    margin-bottom: 20px;
}

.styled-form textarea {
    resize: vertical; /* Allow vertical resizing */
}

.styled-form button[type="submit"] {
    width: 100%;
    padding: 12px;
    font-size: 1.1em;
    margin-top: 10px;
}

/* Messages (Flash) */
.message-container {
    max-width: 800px;
    margin: 0px auto; /* Adjust margin for messages */
    padding: 0 20px; /* Add horizontal padding */
}

.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Hero Section */
.hero {
    background: url('/images/hero-bg.jpg') no-repeat center center/cover; /* Make sure you have a hero-bg.jpg in public/images */
    color: white;
    text-align: center;
    padding: 80px 20px;
    border-radius: 8px;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero h2 {
    color: white;
    font-size: 2.8em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.3em;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero .btn {
    padding: 15px 30px;
    font-size: 1.2em;
    background-color: #28a745; /* Green button */
}

.hero .btn:hover {
    background-color: #218838;
}

/* Boat Listings */
.boat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.boat-card {
    background-color: #fefefe;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.boat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.boat-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #eee;
}

.boat-card h3 {
    margin: 15px 15px 10px;
    font-size: 1.5em;
    color: #007bff;
    text-align: left; /* Align boat title left */
}

.boat-card p {
    padding: 0 15px;
    margin-bottom: 8px;
    color: #666;
}

.boat-card .boat-info {
    font-size: 0.95em;
    font-weight: bold;
    color: #333;
}

.boat-card .boat-description {
    font-size: 0.9em;
    color: #555;
    flex-grow: 1; /* Allows description to take up available space */
    padding-bottom: 15px; /* Add some padding below description */
}

.boat-card .btn {
    display: block;
    width: calc(100% - 30px); /* Adjust for padding */
    margin: 15px;
    padding: 12px;
    font-size: 1.1em;
    box-sizing: border-box; /* Include padding in width */
}

/* Dashboard Sections */
.dashboard-section {
    padding: 20px;
}

.dashboard-section h2, .dashboard-section h3 {
    text-align: center;
    color: #007bff;
}

/* Admin Dashboard Widgets */
.dashboard-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.widget-card {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    flex: 1 1 200px; /* Allows cards to grow/shrink, min-width 200px */
    max-width: 280px;
}

.widget-card h3 {
    margin-top: 0;
    color: #333;
    font-size: 1.2em;
}

.widget-card p {
    font-size: 2em;
    font-weight: bold;
    color: #007bff; /* Blue */
    margin-bottom: 0;
}

/* Responsive Table Styles */
.responsive-table {
    overflow-x: auto; /* Allows horizontal scrolling on small screens */
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background-color: #fefefe;
}

.responsive-table table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px; /* Ensure table doesn't get too small */
}

.responsive-table th, .responsive-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.responsive-table th {
    background-color: #007bff;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.responsive-table tbody tr:nth-child(even) {
    background-color: #f2f2f2;
}

.responsive-table tbody tr:hover {
    background-color: #e9ecef;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
    color: white;
    text-transform: capitalize;
}

.status-pending { background-color: #ffc107; color: #333; } /* Yellowish */
.status-confirmed { background-color: #28a745; } /* Green */
.status-cancelled { background-color: #dc3545; } /* Red */
.status-completed { background-color: #6c757d; } /* Grey */

/* Styling for Yacht Images in Table */
.yacht-thumbnail {
    width: 80px; /* Adjust as needed */
    height: 50px; /* Adjust as needed */
    object-fit: cover; /* Ensures image covers the area without distortion */
    border-radius: 4px;
    vertical-align: middle; /* Aligns image nicely in table cell */
}


/* Profile Details */
.profile-details p {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #333;
}
.profile-details p strong {
    color: #007bff;
}

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

.text-muted {
    color: #777;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: #f0f0f0;
    color: #555;
    border-top: 1px solid #e0e0e0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
    }

    nav ul li {
        margin: 5px 0;
    }

    .hero {
        padding: 60px 15px;
    }

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

    .hero p {
        font-size: 1em;
    }

    .boat-grid {
        grid-template-columns: 1fr; /* Stack cards on small screens */
    }

    .form-container {
        padding: 20px;
    }

    .responsive-table table {
        min-width: unset; /* Remove min-width on very small screens, let it scroll */
    }
}

@media (max-width: 480px) {
    .main {
        padding: 10px;
        margin: 10px auto;
    }

    .message {
        padding: 10px;
        font-size: 0.9em;
    }

    .styled-form input, .styled-form button {
        font-size: 0.9em;
        padding: 10px;
    }

    .dashboard-widgets {
        flex-direction: column;
        align-items: center;
    }

    .widget-card {
        width: 100%;
        max-width: 100%;
    }
}


        .dashboard-container {
            margin-top: 2rem;
        }
        .section-divider {
            border-bottom: 1px solid #eee;
            padding-bottom: 1rem;
            margin-bottom: 1rem;
        }
        .list-group-item {
            border: 1px solid #ddd;
            margin-bottom: 10px;
            border-radius: 5px;
            padding: 15px;
        }
        .badge {
            font-size: 0.85em;
            padding: 0.4em 0.6em;
        }
    