/**
 * CESI Resort Archive Styles
 * Full-screen layout with advanced search and filtering
 */

:root {
    --primary-color: #1e3a5f;
    --secondary-color: #00a86b;
    --accent-color: #ffa500;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --border-color: #e0e0e0;
    --text-dark: #333;
    --text-light: #666;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
}

/* Full Width Container */
.full-width-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Search Header */
.resorts-search-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2c5282 100%);
    color: white;
    padding: 60px 0 50px;
    position: relative;
}

.resorts-search-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.search-header-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
    font-size: 1.4rem;
    margin-bottom: 40px;
    line-height: 1.5;
    color: #ffffff;
    opacity: 1;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Advanced Search Bar */
.advanced-search-bar {
    max-width: 700px;
    margin: 0 auto;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 20px;
    color: var(--text-light);
    pointer-events: none;
}

.resort-search-input {
    width: 100%;
    padding: 18px 60px 18px 55px;
    font-size: 1.15rem;
    border: none;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.resort-search-input:focus {
    outline: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.clear-search-btn {
    position: absolute;
    right: 20px;
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.clear-search-btn:hover {
    background: var(--light-bg);
    color: var(--text-dark);
}

/* Filters Bar */
.filters-bar {
    background: white;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.filters-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    gap: 20px;
}

.filters-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.toggle-filters-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.toggle-filters-btn:hover {
    background: #2c5282;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-count {
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-filter-tag {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-filter-tag button {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
}

.active-filter-tag button:hover {
    color: var(--danger-color);
}

.filters-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.results-count {
    font-size: 1.05rem;
    color: var(--text-dark);
    white-space: nowrap;
}

.results-count .count {
    font-weight: 700;
    color: var(--primary-color);
}

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

.sort-group label {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
}

.sort-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.05rem;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.sort-select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.view-toggle {
    display: flex;
    gap: 5px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    padding: 4px;
}

.view-btn {
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-btn:hover {
    background: var(--light-bg);
}

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

.view-btn svg {
    display: block;
}

/* Filter Panel */
.filter-panel {
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    animation: slideDown 0.3s ease;
}

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

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

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

.filter-group-wide {
    grid-column: 1 / -1;
}

.filter-label {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--primary-color);
}

.filter-select {
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.05rem;
    font-family: inherit;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.checkbox-filters,
.amenities-filters {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.amenities-filters {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 1.05rem;
    color: var(--text-dark);
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    background: #00915c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* Resorts Listing */
.resorts-listing {
    padding: 40px 0 80px;
    background: var(--light-bg);
    min-height: 60vh;
}

.resorts-container {
    transition: all 0.3s ease;
}

/* Grid View */
.resorts-container[data-view="grid"] {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* List View */
.resorts-container[data-view="list"] {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.resorts-container[data-view="list"] .resort-grid-card {
    display: grid;
    grid-template-columns: 300px 1fr;
    max-width: 100%;
}

.resorts-container[data-view="list"] .resort-card-image {
    height: 250px;
}

.resorts-container[data-view="list"] .resort-card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.resorts-container[data-view="list"] .resort-card-scores-mini {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

/* Resort Card Styling */
.resort-grid-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.resort-grid-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.resort-card-image {
    position: relative;
    height: 240px;
    overflow: hidden;
    background: var(--light-bg);
}

.resort-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.resort-grid-card:hover .resort-card-image img {
    transform: scale(1.08);
}

.certified-badge-overlay {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 168, 107, 0.95);
    color: white;
    padding: 8px 14px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(0, 168, 107, 0.3);
    backdrop-filter: blur(10px);
    z-index: 2;
    letter-spacing: 0.3px;
}

.certified-badge-overlay svg {
    flex-shrink: 0;
}

.resort-card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 16px;
}

.resort-card-title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.3;
}

.resort-card-title a {
    color: var(--text-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.resort-card-title a:hover {
    color: var(--secondary-color);
}

.resort-card-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-light);
    font-size: 1.05rem;
}

.resort-card-location svg {
    flex-shrink: 0;
    color: var(--secondary-color);
}

.resort-card-score {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #00915c 100%);
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    margin: 8px 0;
}

.overall-score {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.score-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    line-height: 1;
}

.score-max {
    font-size: 1.3rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
}

.score-label {
    font-size: 0.95rem;
    color: white;
    font-weight: 600;
    margin-top: 8px;
    letter-spacing: 0.3px;
}

.resort-card-scores-mini {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px 0;
    border-top: 2px solid var(--light-bg);
}

.mini-score {
    text-align: center;
    padding: 12px;
    background: var(--light-bg);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mini-score:hover {
    background: #e8f4f0;
    transform: translateY(-2px);
}

.mini-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 6px;
}

.mini-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}

.resort-card-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    margin-top: auto;
    text-align: center;
}

.resort-card-cta:hover {
    background: #2c5282;
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

/* List View Specific Adjustments */
.resorts-container[data-view="list"] .resort-card-image {
    height: 100%;
    min-height: 280px;
}

.resorts-container[data-view="list"] .resort-card-body {
    padding: 28px;
    gap: 18px;
}

.resorts-container[data-view="list"] .resort-card-title {
    font-size: 1.75rem;
}

.resorts-container[data-view="list"] .resort-card-score {
    margin: 12px 0;
}

.resorts-container[data-view="list"] .resort-card-scores-mini {
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    padding: 20px 0;
}

.resorts-container[data-view="list"] .mini-score {
    padding: 16px 12px;
}

.resorts-container[data-view="list"] .resort-card-cta {
    align-self: flex-start;
    padding: 16px 32px;
    font-size: 1.1rem;
}

/* Hidden Cards */
.resort-grid-card.hidden {
    display: none !important;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.no-results svg {
    margin-bottom: 25px;
}

.no-results h2 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.no-results p {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
}

/* Pagination */
.pagination-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.pagination-wrapper .nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination-wrapper a,
.pagination-wrapper span {
    padding: 12px 18px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-wrapper a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.pagination-wrapper .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .container-fluid {
        padding: 0 20px;
    }

    .resorts-container[data-view="grid"] {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }
}

@media (max-width: 992px) {
    .filters-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .filters-right {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .resorts-container[data-view="list"] {
        grid-template-columns: 1fr;
    }

    .resorts-container[data-view="list"] .resort-grid-card {
        grid-template-columns: 1fr;
    }

    /* Card adjustments for tablets */
    .resort-card-image {
        height: 220px;
    }

    .resort-card-title {
        font-size: 1.35rem;
    }

    .resorts-container[data-view="list"] .resort-card-scores-mini {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-title {
        font-size: 2.5rem;
    }

    .page-subtitle {
        font-size: 1.2rem;
    }

    .resort-search-input {
        font-size: 1rem;
        padding: 15px 50px 15px 50px;
    }

    .filters-bar {
        position: relative;
    }

    .filters-wrapper {
        padding: 15px 0;
    }

    .filters-left {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .toggle-filters-btn {
        width: 100%;
        justify-content: center;
    }

    .filters-right {
        gap: 10px;
    }

    .results-count {
        font-size: 0.95rem;
    }

    .sort-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .sort-group label {
        font-size: 0.95rem;
    }

    .sort-select {
        width: 100%;
        font-size: 0.95rem;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .amenities-filters {
        grid-template-columns: 1fr;
    }

    .resorts-container[data-view="grid"] {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* Card adjustments for mobile */
    .resort-card-body {
        padding: 20px;
        gap: 14px;
    }

    .resort-card-title {
        font-size: 1.3rem;
    }

    .resort-card-image {
        height: 200px;
    }

    .score-number {
        font-size: 2.2rem;
    }

    .score-max {
        font-size: 1.1rem;
    }

    .mini-value {
        font-size: 1.4rem;
    }

    .resort-card-cta {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .certified-badge-overlay {
        top: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container-fluid {
        padding: 0 15px;
    }

    .resorts-search-header {
        padding: 40px 0 35px;
    }

    .page-title {
        font-size: 2rem;
    }

    .page-subtitle {
        font-size: 1.05rem;
    }

    .resort-search-input {
        padding: 12px 45px 12px 45px;
        font-size: 0.95rem;
    }

    .search-icon {
        left: 15px;
        width: 16px;
        height: 16px;
    }

    .clear-search-btn {
        right: 15px;
    }

    .filter-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }

    .view-toggle {
        width: 100%;
    }

    .view-btn {
        flex: 1;
    }

    /* Card adjustments for smallest screens */
    .resort-card-body {
        padding: 18px;
        gap: 12px;
    }

    .resort-card-title {
        font-size: 1.2rem;
    }

    .resort-card-location {
        font-size: 0.95rem;
    }

    .resort-card-score {
        padding: 15px;
    }

    .score-number {
        font-size: 2rem;
    }

    .score-label {
        font-size: 0.85rem;
    }

    .resort-card-scores-mini {
        gap: 10px;
        padding: 12px 0;
    }

    .mini-score {
        padding: 10px 8px;
    }

    .mini-label {
        font-size: 0.85rem;
    }

    .mini-value {
        font-size: 1.3rem;
    }
}
