/**
 * Safari Zone Tables CSS
 * Rajasthan Wildlife Safari
 * Fixes for Ranthambore and Jhalana zone tables
 */

/* ===========================
   Zone Guide Section
   =========================== */
.zone-guide-section {
    background-color: #FAF6F1;
    padding: 5rem 0;
}

.zone-guide-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

/* Section Header */
.zone-guide-header {
    text-align: center;
    margin-bottom: 3rem;
}

.zone-guide-title {
    font-size: 3rem;
    color: var(--forest-green);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-family: 'Playfair Display', serif;
}

.zone-guide-title .icon {
    font-size: 2.5rem;
    color: var(--golden-amber);
}

.zone-guide-subtitle {
    font-size: 1.25rem;
    color: #4B5563;
    max-width: 800px;
    margin: 0 auto;
}

/* ===========================
   Safari Zone Table Styles
   =========================== */
.safari-zones-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.safari-zones-table table {
    width: 100%;
    border-collapse: collapse;
}

/* Table Header */
.safari-zones-table thead {
    background-color: var(--forest-green);
}

.safari-zones-table thead tr {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.safari-zones-table thead th {
    color: white;
    padding: 1.25rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 1.1rem;
    font-family: 'Open Sans', sans-serif;
}

.safari-zones-table thead th:first-child {
    width: 15%;
    min-width: 100px;
}

.safari-zones-table thead th:nth-child(2) {
    width: 35%;
}

.safari-zones-table thead th:nth-child(3) {
    width: 30%;
}

.safari-zones-table thead th:last-child {
    width: 20%;
}

/* Table Body */
.safari-zones-table tbody tr {
    border-bottom: 1px solid #E5E7EB;
    transition: background-color 0.3s ease;
}

.safari-zones-table tbody tr:hover {
    background-color: #F9FAFB;
}

.safari-zones-table tbody tr:last-child {
    border-bottom: none;
}

.safari-zones-table tbody td {
    padding: 1.25rem 1.5rem;
    color: var(--gray-700);
    font-size: 1rem;
    line-height: 1.6;
    vertical-align: top;
}

/* Zone Number Styling */
.safari-zones-table tbody td:first-child {
    font-weight: 700;
    color: var(--golden-amber);
    font-size: 1.1rem;
}

/* Highlights Column */
.safari-zones-table tbody td:nth-child(2) {
    color: var(--forest-green);
}

/* Best For Column */
.safari-zones-table tbody td:nth-child(3) {
    color: var(--gray-600);
}

/* Terrain Column */
.safari-zones-table tbody td:last-child {
    color: var(--gray-600);
}

/* ===========================
   Alternating Row Colors
   =========================== */
.safari-zones-table.alternating tbody tr:nth-child(even) {
    background-color: #FAFAFA;
}

.safari-zones-table.alternating tbody tr:nth-child(even):hover {
    background-color: #F3F4F6;
}

/* ===========================
   Compact Version (Jhalana)
   =========================== */
.safari-zones-table.compact thead th {
    padding: 1rem 1.25rem;
    font-size: 1rem;
}

.safari-zones-table.compact tbody td {
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
}

/* ===========================
   Zone Note/Alert
   =========================== */
.zone-note {
    background-color: #FEF3C7;
    border-left: 4px solid var(--golden-amber);
    padding: 1rem 1.5rem;
    margin-top: 2rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.zone-note .icon {
    color: var(--golden-amber);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.zone-note .note-text {
    color: var(--gray-700);
    line-height: 1.6;
}

.zone-note strong {
    color: var(--forest-green);
    font-weight: 600;
}

/* ===========================
   Mobile Responsive Table
   =========================== */
@media (max-width: 992px) {
    .safari-zones-table {
        font-size: 0.9rem;
    }
    
    .safari-zones-table thead th {
        padding: 1rem;
        font-size: 1rem;
    }
    
    .safari-zones-table tbody td {
        padding: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .zone-guide-container {
        padding: 0 1rem;
    }
    
    .zone-guide-title {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .zone-guide-subtitle {
        font-size: 1rem;
    }
    
    /* Convert table to cards on mobile */
    .safari-zones-table table,
    .safari-zones-table thead,
    .safari-zones-table tbody,
    .safari-zones-table th,
    .safari-zones-table td,
    .safari-zones-table tr {
        display: block;
    }
    
    .safari-zones-table thead {
        display: none;
    }
    
    .safari-zones-table tbody tr {
        background: white;
        margin-bottom: 1.5rem;
        padding: 1.5rem;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        border: none;
    }
    
    .safari-zones-table tbody td {
        padding: 0.5rem 0;
        position: relative;
        padding-left: 35%;
        border: none;
    }
    
    .safari-zones-table tbody td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 30%;
        font-weight: 600;
        color: var(--forest-green);
    }
    
    .safari-zones-table tbody td:first-child {
        font-size: 1.25rem;
        padding-left: 0;
        margin-bottom: 1rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid var(--golden-amber);
    }
    
    .safari-zones-table tbody td:first-child:before {
        display: none;
    }
}

/* ===========================
   Table Loading State
   =========================== */
.safari-zones-table.loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.safari-zones-table.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #E5E7EB;
    border-top-color: var(--golden-amber);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ===========================
   Enhanced Ranthambore Table
   =========================== */
.ranthambore-zones-table thead {
    background: linear-gradient(135deg, var(--forest-green) 0%, #2A4A3A 100%);
}

.ranthambore-zones-table tbody td:first-child::before {
    content: "🐅 ";
    margin-right: 0.5rem;
}

/* ===========================
   Enhanced Jhalana Table
   =========================== */
.jhalana-zones-table thead {
    background: linear-gradient(135deg, #2A4A3A 0%, var(--forest-green) 100%);
}

.jhalana-zones-table tbody td:first-child::before {
    content: "🐆 ";
    margin-right: 0.5rem;
}

/* ===========================
   Special Highlights
   =========================== */
.highlight-tag {
    display: inline-block;
    background-color: var(--light-beige);
    color: var(--forest-green);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-right: 0.5rem;
}

.popular-zone {
    position: relative;
}

.popular-zone::after {
    content: "Popular";
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--golden-amber);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}