/* Base Styles */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e67e22;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --medium-gray: #e9ecef;
    --border-color: #dee2e6;
}

body {
    font-family: 'Quicksand', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: white;
    margin: 0;
    padding: 0;
}

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

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 40vh;
    min-height: 300px;
    background: url('../images/hero/hero-ferry.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.6);
}

.hero-overlay {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 300;
}

/* Search Container */
.search-container {
    background: white;
    padding: 20px 0 10px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

/* Search and Actions Bar */
.search-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.search-section {
    flex: 1;
    min-width: 300px;
}

.search-form {
    max-width: 100%;
}

.search-input-group {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.search-input {
    flex: 1;
    padding: 18px 60px 18px 15px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.search-input::placeholder {
    color: #999;
}

.search-button {
    position: absolute;
    right: 5px;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.search-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

/* Left and Right Actions */
.left-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.right-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.action-btn {
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: #333;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.action-btn:hover {
    color: #3498db;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 25px;
    padding: 4px;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.view-btn {
    background: transparent;
    border: none;
    color: #333;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.view-btn.active {
    background: #3498db;
    color: white;
}

.view-btn:hover:not(.active) {
    color: #3498db;
}

/* Sort Dropdown */
.sort-dropdown {
    position: relative;
}

.sort-toggle-btn {
    position: relative;
}

.sort-toggle-btn .fa-chevron-down {
    transition: transform 0.3s ease;
}

.sort-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1000;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.sort-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
}

.sort-option:hover {
    background: #f8f9fa;
    color: #3498db;
}

.sort-option.active {
    background: #3498db;
    color: white;
}

.sort-option i {
    width: 16px;
    text-align: center;
}

/* Full Screen Filters Overlay */
.filters-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.filters-overlay-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.filters-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.close-filters-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-filters-btn:hover {
    background: #f0f0f0;
    color: #333;
}

.filters-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 14px;
}



.filter-select {
    padding: 15px 16px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    background: white;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filters-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 2px solid #f0f0f0;
}

.filter-button {
    flex: 1;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    border: none;
    padding: 15px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.filter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.clear-filters {
    color: #666;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 15px 24px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    transition: all 0.3s ease;
    background: white;
}

.clear-filters:hover {
    color: #333;
    border-color: #ccc;
    background: #f8f9fa;
}

/* Map View Styles */
.view-container {
    width: 100%;
}

.map-container {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

.search-map {
    width: 100%;
    height: 100%;
    border-radius: 12px;
}

/* Custom Island Markers */
.island-marker {
    position: relative;
    width: 12px;
    height: 12px;
}

.island-marker:hover {
    cursor: pointer;
}

.marker-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.marker-icon {
    background: #3498db;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    cursor: pointer;
    pointer-events: auto;
}

.marker-icon:hover {
    transform: scale(1.5);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.6);
}

/* Island Popup - positioned INSIDE the map container */
.island-popup {
    position: absolute;
    left: 50%;
    bottom: 20px;
    transform: translateX(-50%);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(44,62,80,0.10), 0 1.5px 6px rgba(44,62,80,0.08);
    max-width: 420px;
    width: calc(100% - 40px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    border: none;
    padding: 0;
    pointer-events: none;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}
.island-popup.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.popup-link {
    display: flex;
    flex-direction: row;
    width: 100%;
    text-decoration: none !important;
    color: #222 !important;
    background: transparent !important;
    border-radius: 16px;
    transition: box-shadow 0.2s cubic-bezier(.4,0,.2,1), transform 0.2s cubic-bezier(.4,0,.2,1);
    box-shadow: none;
    padding: 0;
    align-items: stretch;
}
.popup-link:visited, .popup-link:active, .popup-link:focus {
    color: #222 !important;
    background: transparent !important;
}


.popup-image-container {
    position: relative;
    width: 160px;
    min-width: 140px;
    height: 140px;
    flex-shrink: 0;
    overflow: hidden;
    display: block;
}

.popup-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0 0 0 0;
    margin: 0;
    box-shadow: none;
    background: #f5f5f5;
    position: relative;
    z-index: 1;
}



.popup-content {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 12px 16px 12px 16px;
    width: 100%;
}

.popup-header {
    display: flex;
    align-items: center;
    margin-bottom: 4px;
    padding: 0;
}

.popup-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0;
    flex: 1;
    line-height: 1.2;
}

.popup-country {
    color: #666;
    font-size: 14px;
    margin-bottom: 4px;
}

.popup-description {
    color: #444;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 6px;
}

.popup-rating {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
}

.popup-rating .stars {
    display: flex;
    gap: 2px;
}

.popup-rating .stars i {
    color: #ddd;
    font-size: 12px;
}

.popup-rating .stars i.filled {
    color: #ffc107;
}

.popup-rating span {
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.popup-details {
    display: flex;
    gap: 12px;
    margin-bottom: 0;
}

.popup-detail {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.popup-detail i {
    color: #3498db;
    font-size: 11px;
}



/* Results Summary */
.results-summary {
    text-align: left;
    margin: 0 0 5px 0;
    padding-left: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.results-summary p {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
    font-weight: 400;
}

.search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.search-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #3498db;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.search-chip.filter-chip {
    background: #e67e22;
}

.chip-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.chip-remove:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.no-results i {
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 20px;
}

.no-results h2 {
    font-size: 2rem;
    margin: 0 0 10px 0;
    color: var(--text-color);
}

.no-results p {
    font-size: 1.1rem;
    margin: 0;
}

/* Islands Grid */
.islands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

/* Island Card */
.island-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.island-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.island-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.island-card:hover .island-image img {
    transform: scale(1.05);
}

.country-flag {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 30px;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.country-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.island-content {
    padding: 25px;
}

.island-name {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.island-name a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.island-name a:hover {
    color: var(--secondary-color);
}

.island-country {
    color: #666;
    font-size: 1rem;
    margin: 0 0 15px 0;
    font-weight: 500;
}

.island-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.island-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    display: flex;
    gap: 2px;
}

.stars i {
    color: #ddd;
    font-size: 1rem;
}

.stars i.filled {
    color: #ffc107;
}

.rating-text {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.island-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.detail {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    color: #666;
}

.detail i {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Large screens - 4 islands per row */
@media (min-width: 1200px) {
    .islands-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: none;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .search-actions-bar {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .search-section {
        min-width: auto;
        width: 100%;
        order: 1;
    }
    
    .left-actions {
        order: 2;
        width: 100%;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .right-actions {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    .action-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .view-toggle {
        width: auto;
    }
    
    .search-input-group {
        border-radius: 25px;
    }
    
    .search-input {
        padding: 15px 50px 15px 10px;
        font-size: 1rem;
    }
    
    .search-button {
        padding: 10px 15px;
    }
    
    .sort-menu {
        right: auto;
        left: 0;
        min-width: 180px;
    }
    
    .filters-overlay-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    .filters-header h2 {
        font-size: 20px;
    }
    
    .map-container {
        height: 60vh;
        min-height: 400px;
    }
    
    .marker-tooltip {
        min-width: 180px;
        max-width: 200px;
        padding: 12px;
    }
    
    .marker-tooltip h4 {
        font-size: 14px;
    }
    
    .marker-tooltip p {
        font-size: 12px;
    }
    
    .islands-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .island-content {
        padding: 20px;
    }
    
    .island-name {
        font-size: 1.2rem;
    }
    
    .island-details {
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 30vh;
        min-height: 250px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .search-container {
        padding: 30px 0;
    }
    
    .filters-form {
        padding: 20px;
    }
    
    .island-image {
        height: 180px;
    }
    
    .island-content {
        padding: 15px;
    }
    
    .island-details {
        flex-direction: column;
        gap: 10px;
    }
} 

@media (max-width: 600px) {
    .island-popup {
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
        left: 50%;
        bottom: 10px;
        border-radius: 12px;
        flex-direction: column;
    }
    .popup-link {
        flex-direction: column;
        width: 100%;
    }
    .popup-image-container {
        width: 100%;
        min-width: 0;
        height: 160px;
        order: -1;
        flex-shrink: 0;
    }
    .popup-image {
        border-radius: 12px 12px 0 0;
        width: 100%;
        height: 100%;
    }

    .popup-content {
        padding: 12px 12px 12px 12px;
        width: 100%;
        flex-shrink: 1;
    }
} 