/* Ribbon (for potential future use) */
.ribbon {
  width: 100px;
  height: 100px;
  overflow: hidden;
  position: absolute;
  top: -5px;
  left: -5px;
  z-index: 1;
}

.ribbon span {
  position: absolute;
  display: block;
  width: 140px;
  padding: 5px 0;
  background-color: rgba(226, 199, 116, 0.85);
  color: #000;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  transform: rotate(-45deg);
  top: 25px;
  left: -35px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Header Layout */
header {
    background: linear-gradient(90deg, #f7f7f7, #ffffff);
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1000;
}

/* Header Text (for potential future use) */
.header-text {
    flex: 1;
    padding-left: 20px;
}
.header-text h2 {
    margin: 0;
    font-size: 24px;
    color: #222;
}
.header-text p {
    margin: 4px 0 0;
    font-size: 14px;
    color: #555;
}

/* Header Container */
.header-container {
    max-width: 1100px;
    gap: 20px;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

/* Header Left Set (First Set) */
.header-left-set {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo img {
    height: 70px;
    transition: transform 0.3s ease;
}
.logo img:hover {
    transform: scale(1.05);
}
.header-info {
    display: flex;
    flex-direction: column;
}
.website-url {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}
.welcome-text {
    font-size: 14px;
    color: #666;
    font-style: italic;
}

/* Tagline */
.tagline {
    font-size: 20px;
    color: #007bff;
    font-weight: bold;
    flex-grow: 1;
    text-align: center;
    padding: 0 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Header Right Set (Second Set) */
.header-right-set {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
    min-width: 0;
}

/* Search Form */
.search-form {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    max-width: 300px;
    margin: 0;
}

.search-input-wrapper {
    position: relative;
    width: 100%;
}

.search-input-wrapper input[type="text"] {
    width: 100%;
    padding: 10px 15px; /* Removed padding-right for icon space since button is removed */
    border-radius: 25px;
    border: 1px solid #ccc;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.search-input-wrapper input[type="text"]:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

/* Remove search-icon-btn styles since button is removed */
.search-icon-btn {
    display: none; /* Ensure no residual effect */
}

/* Menu Buttons */
.menu-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Menu Actions */
.menu-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}
.menu-link {
    padding: 10px 18px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 15px;
    transition: background 0.3s, transform 0.2s;
}
.menu-link:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* App Link */
.app-link {
    padding: 10px 18px;
    background: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 15px;
    white-space: nowrap;
    transition: background 0.3s, transform 0.2s;
}
.app-link:hover {
    background: #218838;
    transform: translateY(-2px);
}

/* Container (Center content without full screen, left-aligned internally) */
.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
    text-align: left;
}

/* Section Title */
.section-title {
    font-size: 24px;
    margin-bottom: 20px;
}

/* Business Card (for index.php) */
.business-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #eaf4ff;
    border-radius: 10px;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.3s ease;
    border: 1px solid #ddd;
}
.business-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.business-card img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}
.business-details h2 {
    font-size: 20px;
    margin-bottom: 10px;
}
.view-button {
    margin-top: 10px;
    display: inline-block;
    background: #007bff;
    color: #fff;
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 14px;
    transition: background 0.3s;
}
.view-button:hover {
    background: #0056b3;
}

/* Business Image (for business.php) */
.business-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    margin-bottom: 20px;
}

/* Info Section (for business.php) */
.info p {
    margin: 8px 0;
}
.info strong {
    display: inline-block;
    width: 150px;
}

/* View File Button (for business.php) */
.view-file {
    display: inline-block;
    padding: 10px 15px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 10px;
    transition: background 0.3s;
}
.view-file:hover {
    background-color: #0056b3;
}

/* Pagination (for index.php) */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}
.pagination-button {
    padding: 8px 12px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}
.pagination-button:hover {
    background: #0056b3;
}
.pagination-button.active {
    background: #0056b3;
}

/* Viewer (for preview.php) */
.viewer {
    max-width: 900px;
    margin: auto;
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}
.viewer iframe,
.viewer img {
    width: 100%;
    max-height: 90vh;
    border: none;
}

/* Result Card (for search.php) */
.result-card {
    background: #fff;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 15px;
}
.result-card img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}
.result-info {
    flex: 1;
}
.result-info h3 {
    margin: 0 0 10px;
}
.result-info p {
    margin: 0 0 5px;
    font-size: 14px;
}
.view-link {
    display: inline-block;
    margin-top: 10px;
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}
.view-link:hover {
    color: #0056b3;
}

/* Search Input (for search.php) */
#searchInput {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    margin-bottom: 20px;
    border: 1px solid #ccc;
    border-radius: 5px;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
#searchInput:focus {
    border-color: #007bff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

/* Form Group (for add.php and contact.php) */
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="number"]:focus,
.form-group input[type="url"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #007bff;
    outline: none;
}
.form-group textarea {
    height: 120px;
    resize: vertical;
}
.form-group input[type="file"] {
    padding: 5px;
}

/* Submit Button (for add.php and contact.php) */
button[type="submit"] {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}
button[type="submit"]:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Errors and Success Messages */
.errors,
.success {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}
.errors p {
    background: #ffebee;
    color: #c62828;
}
.success p {
    background: #e8f5e9;
    color: #2e7d32;
}

/* Terms (for add.php) */
.terms {
    margin-top: 20px;
    font-size: 12px;
    color: #666;
}
.terms a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}
.terms a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Contact Wrapper */
.contact-wrapper {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

/* Contact Details */
.contact-details {
    flex: 1;
    min-width: 300px;
}

/* Office Card */
.office-card {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.office-card h2 {
    font-size: 20px;
    color: #007bff;
    margin-bottom: 15px;
}
.office-card p {
    margin: 10px 0;
    font-size: 16px;
}
.office-card strong {
    display: inline-block;
    width: 100px;
    color: #333;
}
.office-card a {
    color: #007bff;
    text-decoration: none;
}
.office-card a:hover {
    text-decoration: underline;
}

/* Contact Form */
.contact-form {
    flex: 1;
    min-width: 300px;
}
.contact-form h2 {
    font-size: 20px;
    color: #007bff;
    margin-bottom: 15px;
}
.contact-form .form-group {
    margin-bottom: 20px;
}
.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}
.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form textarea:focus {
    border-color: #007bff;
    outline: none;
}
.contact-form textarea {
    height: 120px;
    resize: vertical;
}
.contact-form .menu-link {
    padding: 10px 20px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    transition: background 0.3s;
}
.contact-form .menu-link:hover {
    background: #0056b3;
}

/* Wrapper for Footer to push it to bottom */
.site-footer-wrapper {
    width: 100%;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

/* Sticky footer logic (keep outside .container) */
html, body {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Main page content should flex-grow to push footer down */
body > .wrapper {
    flex: 1 0 auto;
}

/* Footer full width + style remains same */
footer {
    width: 100%;
    margin: 0;
    padding: 20px;
    background: #001f3f;
    color: white;
    text-align: center;
    font-size: 14px;
}

footer a {
    color: #ffeb3b;
    margin: 0 10px;
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #fff176;
    text-decoration: underline;
}

footer .app-link {
    margin-top: 10px;
    display: inline-block;
    background: #ffeb3b;
    color: #000;
    padding: 10px 18px;
    border-radius: 5px;
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.3s, transform 0.2s;
}

footer .app-link:hover {
    background: #fdd835;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    .header-left-set,
    .header-right-set {
        width: 100%;
    }
    .header-right-set {
        flex-direction: column;
        gap: 10px;
    }
    .search-form {
        max-width: 100%;
        margin: 10px 0;
    }
    .menu-buttons {
        justify-content: center;
    }
    .app-link {
        width: 100%;
        text-align: center;
    }
    .container {
        margin-top: 10px;
        padding: 15px;
    }
    .business-card {
        flex-direction: column;
        text-align: center;
    }
    .business-card img {
        margin: 0 auto;
    }
    .pagination {
        flex-direction: column;
        gap: 5px;
    }
    .pagination-button {
        width: 100%;
        text-align: center;
    }
    .contact-wrapper {
        flex-direction: column;
    }
    .contact-details, .contact-form {
        width: 100%;
    }
    .office-card {
        margin-bottom: 15px;
    }
    .contact-form textarea {
        height: 100px;
    }
}