/* Samuel Oliveira - Corretor de Imóveis
   Baseado no Manual da Marca */

@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;600;700&display=swap');

/* Variáveis da Marca */
:root {
    --color-primary: #0b50d2;
    --color-secondary: #ffffff;
    --color-text: #000000;
    --color-gray-light: #f5f5f5;
    --color-gray: #e0e0e0;
    --color-gray-dark: #333333;
    --color-success: #10b981;
    --color-warning: #f59e0b;
    
    --font-heading: 'Kanit', sans-serif;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    line-height: 1.6;
    background: var(--color-secondary);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: 1rem;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-wide {
    max-width: 1400px;
}

.container-narrow {
    max-width: 900px;
}

/* Header */
.header {
    background: var(--color-secondary);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.header__logo img {
    height: 50px;
    width: auto;
}

.header__nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header__nav a {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-text);
    position: relative;
}

.header__nav a:hover {
    color: var(--color-primary);
}

.header__nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: var(--transition);
}

.header__nav a:hover::after,
.header__nav a.active::after {
    width: 100%;
}

.header__mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.header__mobile-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, #083fa3 100%);
    color: var(--color-secondary);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h100v100H0z" fill="none"/><path d="M50 0L100 50L50 100L0 50z" fill="rgba(255,255,255,0.02)"/></svg>');
    opacity: 0.5;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-photo-desktop {
    display: block;
    position: relative;
}

.hero__grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4rem;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Search Box */
.search-box {
    background: var(--color-secondary);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    margin-top: 2rem;
}

.search-box__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.search-box select,
.search-box input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--color-gray);
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-body);
    transition: var(--transition);
}

.search-box select:focus,
.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-align: center;
}

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

.btn-primary:hover {
    background: #083fa3;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.btn-whatsapp {
    background: #25D366;
    color: var(--color-secondary);
}

.btn-whatsapp:hover {
    background: #1ebe57;
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* Cards */
.card {
    background: var(--color-secondary);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-4px);
}

.card__image {
    width: 100%;
    height: 240px;
    object-fit: cover;
    background: var(--color-gray-light);
}

.card__badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-primary);
    color: var(--color-secondary);
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
}

.card__content {
    padding: 1.5rem;
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card__location {
    color: var(--color-gray-dark);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card__features {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-gray);
}

.card__feature {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--color-gray-dark);
}

.card__price {
    font-size: 1.75rem;
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.card__actions {
    display: flex;
    gap: 0.75rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Section */
.section {
    padding: 5rem 0;
}

.section-gray {
    background: var(--color-gray-light);
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
}

.section__title {
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.section__subtitle {
    color: var(--color-gray-dark);
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* City Cards */
.city-card {
    position: relative;
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.city-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
}

.city-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.city-card__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 2rem;
    color: var(--color-secondary);
}

.city-card__title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.city-card__count {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature__icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    background: var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-secondary);
    font-size: 1.5rem;
}

.feature__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.feature__description {
    color: var(--color-gray-dark);
}

/* Footer */
.footer {
    background: var(--color-gray-dark);
    color: var(--color-secondary);
    padding: 3rem 0 1.5rem;
}

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

.footer__section h3 {
    margin-bottom: 1rem;
    color: var(--color-secondary);
}

.footer__section a {
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.footer__section a:hover {
    opacity: 1;
    color: var(--color-primary);
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    opacity: 0.8;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-xl);
    z-index: 999;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    50% { box-shadow: 0 0 0 20px rgba(37, 211, 102, 0); }
}

/* Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

/* Responsive */
@media (max-width: 768px) {
    .header__nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-secondary);
        flex-direction: column;
        gap: 0;
        box-shadow: var(--shadow-lg);
    }
    
    .header__nav.active {
        display: flex;
    }
    
    .header__nav a {
        padding: 1rem 1.5rem;
        width: 100%;
        border-bottom: 1px solid var(--color-gray);
    }
    
    .header__mobile-toggle {
        display: flex;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .search-box__grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .hero__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-photo-desktop {
        display: block !important;
        margin: 2rem auto 0;
        text-align: center;
        order: 2; /* Foto vai para baixo */
    }
    
    .hero__content {
        order: 1; /* Texto fica em cima */
    }
    
    .hero-photo-desktop > div:first-child {
        display: inline-block;
        position: relative;
    }
    
    .hero-photo-desktop img {
        width: 200px !important;
        height: 250px !important;
        margin: 0 auto;
        display: block;
    }
    
    .hero-photo-desktop > div:first-child > div:last-child {
        /* Card do nome */
        white-space: normal !important;
        max-width: 200px;
    }
    
    .section {
        padding: 3rem 0;
    }
}
