/* style.css */
:root {
    --primary: #4f46e5;
    --secondary: #ec4899;
    --dark: #0f172a;
    --light: #f1f5f9;
    --white: #ffffff;
    --gray: #64748b;
    --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--light); color: var(--dark); overflow-x: hidden; display: flex; flex-direction: column; min-height: 100vh; }
a { text-decoration: none; color: inherit; transition: 0.3s; }

/* HEADER */
header {
    background: var(--white);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky; top: 0; z-index: 1000;
}

/* BRAND LOGO */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.5rem; color: var(--primary); }
.brand-logo { height: 40px; width: auto; object-fit: contain; }

/* HEADER ACTIONS */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-search-icon {
    font-size: 1.2rem;
    color: var(--dark);
    cursor: pointer;
    transition: 0.3s;
    padding: 8px;
    border-radius: 50%;
}
.header-search-icon:hover { background: #f1f5f9; color: var(--primary); }

/* DESKTOP NAV */
nav ul { display: flex; gap: 20px; list-style: none; }
nav a { font-weight: 600; color: var(--gray); }
nav a:hover { color: var(--primary); }

/* MOBILE MENU ICON */
.mobile-menu-icon { display: none; font-size: 1.5rem; color: var(--dark); cursor: pointer; }

/* HERO */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1rem 5% 4rem 5%;
    text-align: center;
    color: white;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

/* FILTER BOX WRAPPER */
.filter-wrapper {
    max-width: 900px;
    margin: -70px auto 30px auto;
    position: relative;
    z-index: 10;
    padding: 0 20px;
}

.filter-container {
    background: rgba(255, 255, 255, 0.95);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.4s ease;
}

.dropdown-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
select, input[type="text"] {
    padding: 15px; border-radius: 10px; border: 1px solid #e2e8f0; font-size: 1rem; width: 100%; outline: none;
}
.search-btn {
    background: var(--dark); color: white; border: none; padding: 15px; border-radius: 10px; 
    cursor: pointer; font-weight: bold; width: 100%; font-size: 1rem;
}
.search-btn:hover { background: #000; transform: scale(1.02); }

/* RESULTS HEADER (New Style - Looks like a card) */
.results-header {
    text-align: center;
    margin: -50px auto 40px auto; /* Pulls up over Hero slightly */
    max-width: 900px;
    padding: 30px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}
.results-header h2 { 
    font-size: 1.8rem; 
    color: var(--dark); 
    margin-bottom: 10px; 
}
.results-header p { 
    color: var(--gray); 
    font-size: 1.1rem; 
    font-weight: 500;
}

/* GRID LAYOUT */
.container { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 0 60px;   /* ✅ Added proper side breathing space */
    flex: 1; 
}
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;          /* equal spacing both directions */

    
    align-items: stretch; 
    margin: 40px 0 80px 0;  /* space above and below grid */
    
}

/* CARDS */
/* style.css */
.card {
    background: var(--white);
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--card-shadow);
    display: flex; 
    flex-direction: column; 
    justify-content: space-between;
    height: 100%; 
    border-top: 5px solid var(--primary);
    transition: transform 0.3s;
    position: relative;

    width: 100%;
    min-width: 0;
    overflow: hidden;

    /* 👇 Add this */
}

.card:hover { transform: translateY(-8px); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.card h3 { 
    font-size: 1.25rem; color: var(--dark); line-height: 1.4; margin-bottom: 15px; 
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
    min-height: 4.2em; 
}
.card .ente {
    font-size: 0.85rem; font-weight: 700; color: var(--gray); text-transform: uppercase; margin-bottom: 10px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block;
}
.card-meta { 
    margin-top: auto; padding-top: 15px; border-top: 1px solid #f1f5f9;
    display: flex; flex-wrap: wrap; gap: 10px; 
}
.badge { padding: 5px 10px; border-radius: 8px; font-weight: bold; font-size: 0.75rem; }
.badge-geo { background: #e0e7ff; color: #4338ca; }
.badge-rate { background: #fce7f3; color: #be185d; }

/* PAGINATION */
.pagination { display: flex; justify-content: center; gap: 8px; margin: 50px 0; clear: both; }
.page-link {
    width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    background: white; border-radius: 8px; font-weight: 600; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.page-link.active { background: var(--primary); color: white; }

/* DETAIL PAGE STYLE */
.detail-wrapper { max-width: 800px; margin: -50px auto 60px auto; position: relative; z-index: 10; padding: 0 20px; }
.detail-paper { background: white; padding: 50px; border-radius: 20px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.detail-header { text-align: center; margin-bottom: 40px; padding-bottom: 30px; border-bottom: 1px solid #e2e8f0; }
.detail-header h1 { font-size: 2rem; margin-bottom: 15px; line-height: 1.3; }
.detail-agency { font-size: 1.1rem; color: var(--gray); font-weight: 600; text-transform: uppercase; }
.detail-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 40px; }
.stat-box { background: #f8fafc; padding: 20px; border-radius: 12px; text-align: center; border: 1px solid #e2e8f0; }
.stat-label { display: block; font-size: 0.85rem; color: var(--gray); margin-bottom: 5px; text-transform: uppercase; }
.stat-value { font-size: 1.1rem; font-weight: 700; color: var(--dark); }
.detail-desc { line-height: 1.8; color: #334155; font-size: 1.05rem; margin-bottom: 40px; white-space: pre-line; }

/* FOOTER */
footer {
    background: var(--dark);
    color: #cbd5e1;
    padding: 70px 5% 40px 5%;
    margin-top: auto;
    text-align: center;
}

/* Center top logo */
.footer-logo-center {
    margin-bottom: 50px;
}

.footer-logo-center img {
    height: 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;  /* 3 equal columns */
    max-width: 1200px;
    margin: 0 auto;
    align-items: start;
}


.footer-left {
    text-align: left;
}

.footer-center {
    grid-column: 2;   /* Put Quick Links in center column */
    text-align: center;
}


/* Headings */
.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

/* Links */
.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #94a3b8;
    transition: 0.3s;
}

.footer-col ul li a:hover {
    color: white;
}

/* Bottom copyright */
.footer-bottom {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #1e293b;
    opacity: 0.6;
    font-size: 0.9rem;
}

.detail-agency a {
    color: var(--primary);
    text-decoration: none;
    transition: 0.3s;
}

.detail-agency a:hover {
    color: var(--primary);
}

.contact-card {
    background: white;
    padding: 50px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 500px;
    text-align: center;
}

.contact-card h2 {
    margin-bottom: 10px;
}

.contact-subtitle {
    color: var(--gray);
    margin-bottom: 30px;
}

.input-group {
    text-align: left;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    outline: none;
    font-size: 1rem;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: var(--primary);
}

.contact-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 10px;
    width: 100%;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.contact-btn:hover {
    background: var(--secondary);
}

.success-msg {
    background: #dcfce7;
    color: #166534;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.error-msg {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}


/* RESPONSIVE & MOBILE MENU */
@media (max-width: 1024px) { .grid { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 768px) { 
    .grid { grid-template-columns: 1fr; } 
    .dropdown-row { grid-template-columns: 1fr; }
    .detail-paper { padding: 30px 20px; }
    .detail-stats { grid-template-columns: 1fr; }
    
    /* MOBILE HEADER CHANGES */
    .mobile-menu-icon { 
        display: block; 
        margin-left: auto; 
    }
    .container {
        padding: 0 15px;   /* ✅ smaller side spacing only for mobile */
    } 
    
    nav ul {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%; right: 0; left: 0;
        background: white;
        padding: 20px;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        text-align: center;
    }
    nav ul.active { display: flex; } 

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    /* Center logo only in mobile */
    .footer-left .brand {
        justify-content: center;
    }

    .footer-left {
        text-align: center;
    }

    .footer-center {
        text-align: center;
    }

    .contact-card {
        padding: 30px 20px;
    }

}