/* =========================
GLOBAL
========================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:'Poppins',sans-serif;
    background:#f5f7fb;
    color:#111827;
    overflow-x:hidden;
}

img{
    max-width:100%;
}

a{
    text-decoration:none;
}

.section{
    padding:90px 6%;
}

.section-title{
    text-align:center;
    margin-bottom:60px;
}

.section-title span{
    color:#2563eb;
    font-size:14px;
    text-transform:uppercase;
    letter-spacing:1px;
    font-weight:600;
}

.section-title h2{
    font-size:42px;
    margin-top:12px;
}

/* =========================
HEADER
========================= */

.header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    z-index:999;
    background:rgba(255,255,255,0.96);
    backdrop-filter:blur(10px);
    box-shadow:0 2px 15px rgba(0,0,0,0.06);
}

.navbar{
    max-width:1400px;
    margin:auto;
    padding:16px 6%;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.logo{
    display:flex;
    align-items:center;
    gap:12px;
}

.logo img{
    width:52px;
    height:52px;
    border-radius:14px;
    object-fit:cover;
}

.logo-text{
    font-size:24px;
    font-weight:700;
    color:#111827;
}

.logo-text span{
    color:#2563eb;
}

.nav-links{
    display:flex;
    align-items:center;
    gap:32px;
}

.nav-links a{
    color:#111827;
    font-weight:500;
    transition:0.3s;
    position:relative;
}

.nav-links a:hover{
    color:#2563eb;
}

.nav-links a::after{
    content:'';
    position:absolute;
    left:0;
    bottom:-6px;
    width:0%;
    height:2px;
    background:#2563eb;
    transition:0.3s;
}

.nav-links a:hover::after{
    width:100%;
}

.header-btn{
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:white !important;
    padding:12px 22px;
    border-radius:12px;
    font-weight:600;
}

.mobile-toggle{
    display:none;
    font-size:28px;
    cursor:pointer;
}

/* =========================
HERO
========================= */

.hero{
    position:relative;
    padding:180px 6% 130px;
    background:
    linear-gradient(
        135deg,
        rgba(15,23,42,0.92),
        rgba(37,99,235,0.90)
    ),
    url('https://images.unsplash.com/photo-1520607162513-77705c0f0d4a?q=80&w=1400&auto=format&fit=crop');

    background-size:cover;
    background-position:center;
    color:white;
}

.hero-content{
    max-width:780px;
}

.hero-badge{
    display:inline-flex;
    align-items:center;
    gap:10px;
    background:rgba(255,255,255,0.12);
    padding:10px 18px;
    border-radius:50px;
    margin-bottom:25px;
    backdrop-filter:blur(10px);
}

.hero h1{
    font-size:68px;
    line-height:1.1;
    margin-bottom:24px;
    font-weight:800;
}

.hero h1 span{
    color:#ffd54f;
}

.hero p{
    font-size:19px;
    line-height:1.9;
    opacity:0.92;
}

.search-container{
    margin-top:40px;
    background:white;
    padding:14px;
    border-radius:20px;
    display:flex;
    gap:14px;
    box-shadow:0 20px 60px rgba(0,0,0,0.25);
}

.search-container input{
    flex:1;
    border:none;
    outline:none;
    padding:20px;
    font-size:16px;
    border-radius:14px;
    background:#f3f4f6;
}

.search-container button{
    border:none;
    padding:0 34px;
    border-radius:14px;
    background:linear-gradient(135deg,#2563eb,#1d4ed8);
    color:white;
    font-weight:600;
    cursor:pointer;
    transition:0.3s;
}

.search-container button:hover{
    transform:translateY(-2px);
}

/* =========================
CATEGORIES
========================= */

.category-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    gap:28px;
}

.category-card{
    background:white;
    border-radius:24px;
    padding:35px;
    box-shadow:0 10px 25px rgba(0,0,0,0.06);
    transition:0.4s;
}

.category-card:hover{
    transform:translateY(-10px);
}

.category-icon{
    width:80px;
    height:80px;
    border-radius:22px;
    background:linear-gradient(135deg,#2563eb,#60a5fa);
    display:flex;
    align-items:center;
    justify-content:center;
    color:white;
    font-size:30px;
    margin-bottom:25px;
}

.category-card h3{
    font-size:24px;
    margin-bottom:16px;
}

.category-card p{
    color:#6b7280;
    line-height:1.8;
}

/* =========================
AGENTS
========================= */
.agent-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(300px,1fr));
    gap:28px;
    align-items:stretch;
    justify-items:center;
}

.agent-card{
    background:white;
    border-radius:24px;
    overflow:hidden;
    box-shadow:0 10px 25px rgba(0,0,0,0.06);
    transition:0.4s;

    /* IMPORTANT FIX */
    width:100%;
    max-width:340px;
    display:flex;
    flex-direction:column;
}


.agent-card:hover{
    transform:translateY(-8px);
}

.agent-image {
    height: 220px;
    overflow: hidden;
    /* Add a background color so images with transparency or different ratios look clean */
    background-color: #f3f4f6; 
    display: flex;
    align-items: center;
    justify-content: center;
}

.agent-image img {
    /* Change 'cover' to 'contain' to see the whole image */
    width: 100%;
    height: 100%;
    object-fit: contain; 
    
    /* Optional: Add padding so the logo doesn't touch the very edge of the card */
    padding: 10px; 
    
    transition: 0.4s;
}

/* Update hover effect to work better with 'contain' */
.agent-card:hover .agent-image img {
    transform: scale(1.02); /* Slight zoom so it doesn't look jittery */
}

.agent-content{
    padding:22px;
    display:flex;
    flex-direction:column;
    gap:8px;
}

.agent-tag{
    display:inline-block;
    padding:8px 15px;
    background:#eff6ff;
    color:#2563eb;
    border-radius:50px;
    font-size:13px;
    font-weight:600;
    margin-bottom:18px;
}

.agent-content h3{
    font-size:24px;
    margin-bottom:12px;
}

.agent-info{
    color:#6b7280;
    margin-bottom:10px;
}

.agent-buttons{
    display:flex;
    gap:10px;
    margin-top:18px;
}

.whatsapp-btn,
.profile-btn{
    flex:1;
    padding:12px;
    border-radius:12px;
    font-size:14px;
    font-weight:600;
    transition:0.3s;
}

.whatsapp-btn:hover{
    transform:translateY(-2px);
}

.profile-btn:hover{
    background:#2563eb;
}
/* =========================
FOOTER
========================= */

.footer{
    background:#0f172a;
    color:white;
    padding:80px 6% 30px;
}

.footer-grid{
    display:grid;
    grid-template-columns:2fr 1fr 1fr 1.5fr;
    gap:40px;
    margin-bottom:50px;
}

.footer-logo{
    width:70px;
    height:70px;
    border-radius:16px;
    object-fit:cover;
    margin-bottom:20px;
}

.footer-about p{
    color:#cbd5e1;
    line-height:1.8;
}

.footer h3{
    font-size:20px;
    margin-bottom:22px;
}

.footer-links{
    display:flex;
    flex-direction:column;
    gap:14px;
}

.footer-links a{
    color:#cbd5e1;
    transition:0.3s;
}

.footer-links a:hover{
    color:white;
    padding-left:5px;
}

.footer-contact p{
    color:#cbd5e1;
    margin-bottom:14px;
    line-height:1.7;
}

.social-icons{
    display:flex;
    gap:14px;
    margin-top:22px;
}

.social-icons a{
    width:42px;
    height:42px;
    border-radius:12px;
    background:rgba(255,255,255,0.1);
    display:flex;
    align-items:center;
    justify-content:center;
    color:white;
    transition:0.3s;
}

.social-icons a:hover{
    background:#2563eb;
    transform:translateY(-4px);
}

.footer-bottom{
    border-top:1px solid rgba(255,255,255,0.1);
    padding-top:24px;
    text-align:center;
    color:#94a3b8;
}

/* =========================
RESPONSIVE
========================= */

@media(max-width:992px){

    .hero h1{
        font-size:50px;
    }

    .footer-grid{
        grid-template-columns:1fr 1fr;
    }

}

@media(max-width:768px){

    .mobile-toggle{
        display:block;
    }

    .nav-links{
        position:absolute;
        top:85px;
        left:0;
        width:100%;
        background:white;
        flex-direction:column;
        align-items:flex-start;
        padding:25px 6%;
        gap:20px;
        display:none;
    }

    .nav-links.active{
        display:flex;
    }

    .hero{
        padding-top:150px;
    }

    .hero h1{
        font-size:42px;
    }

    .search-container{
        flex-direction:column;
    }

    .search-container button{
        height:56px;
    }

    .footer-grid{
        grid-template-columns:1fr;
    }

    .section-title h2{
        font-size:34px;
    }

}