/* ==========================================================
   Prime Costa del Sol — Stylesheet
   ========================================================== */
:root {
    --color-bg: #FAF8F5;
    --color-surface: #FFFFFF;
    --color-text: #1A1A1A;
    --color-text-muted: #6B6560;
    --color-primary: #1B4D5C;
    --color-primary-light: #2A7A8F;
    --color-accent: #C8956C;
    --color-accent-light: #E8C9AB;
    --color-border: #E8E3DD;
    --color-success: #2E7D5B;
    --color-warning: #D4880F;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.1);
    --max-width: 1280px;
    --header-height: 72px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-primary-light); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* HEADER */
.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
}
.header-inner {
    max-width: var(--max-width); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between; height: 100%;
}
.logo { display: flex; flex-direction: column; gap: 0; line-height: 1.1; text-decoration: none; }
.logo-prime { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--color-primary); letter-spacing: -0.02em; }
.logo-costa { font-family: var(--font-body); font-weight: 400; font-size: 11px; color: var(--color-accent); text-transform: uppercase; letter-spacing: 0.18em; }
.main-nav { display: flex; gap: 36px; }
.main-nav a { font-size: 14px; font-weight: 500; color: var(--color-text); letter-spacing: 0.02em; position: relative; padding: 4px 0; }
.main-nav a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--color-accent); transition: width 0.3s ease; }
.main-nav a:hover::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--color-text); transition: 0.3s; }

/* HERO */
.hero {
    position: relative; height: 85vh; min-height: 600px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(165deg, var(--color-primary) 0%, #0D3A4A 40%, #1B4D5C 100%);
    overflow: hidden; margin-top: var(--header-height);
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 70% 40%, rgba(200,149,108,0.15), transparent),
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(42,122,143,0.2), transparent);
}
.hero-overlay {
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; text-align: center; color: white; max-width: 720px; padding: 0 24px; animation: fadeInUp 0.8s ease-out; }
.hero-eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: 0.25em; color: var(--color-accent-light); margin-bottom: 20px; font-weight: 500; }
.hero h1 { font-family: var(--font-display); font-size: clamp(36px, 5.5vw, 64px); font-weight: 600; line-height: 1.15; margin-bottom: 20px; letter-spacing: -0.02em; }
.hero h1 em { font-style: italic; color: var(--color-accent-light); }
.hero-sub { font-size: 17px; color: rgba(255,255,255,0.75); max-width: 520px; margin: 0 auto 36px; line-height: 1.6; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; font-size: 14px; font-weight: 600; font-family: var(--font-body);
    border-radius: var(--radius-xl); cursor: pointer; transition: all 0.25s ease;
    border: 2px solid transparent; letter-spacing: 0.02em; text-decoration: none;
}
.btn-primary { background: var(--color-accent); color: white; border-color: var(--color-accent); }
.btn-primary:hover { background: #B88058; border-color: #B88058; color: white; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(200,149,108,0.35); }
.btn-outline { background: transparent; color: white; border-color: rgba(255,255,255,0.35); }
.btn-outline:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); color: white; }
.btn-secondary { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.btn-secondary:hover { background: var(--color-primary-light); border-color: var(--color-primary-light); color: white; transform: translateY(-1px); }

/* SECTIONS */
.section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 56px; }
.section-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--color-accent); font-weight: 600; margin-bottom: 12px; }
.section-header h2 { font-family: var(--font-display); font-size: clamp(28px, 3.5vw, 42px); font-weight: 600; color: var(--color-text); letter-spacing: -0.02em; }
.section-header h2 em { font-style: italic; color: var(--color-primary); }
.section-cta { text-align: center; margin-top: 48px; }

/* PROJECT CARDS */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 28px; }
.project-card { background: var(--color-surface); border-radius: var(--radius-lg); overflow: hidden; text-decoration: none; color: var(--color-text); box-shadow: var(--shadow-sm); transition: all 0.35s ease; display: block; }
.project-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); color: var(--color-text); }
.card-image { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--color-border); }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.project-card:hover .card-image img { transform: scale(1.05); }
.card-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--color-text-muted); }
.card-placeholder svg { width: 48px; height: 48px; }
.card-status { position: absolute; top: 16px; left: 16px; padding: 6px 14px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; border-radius: var(--radius-sm); backdrop-filter: blur(8px); }
.status-active { background: rgba(46,125,91,0.88); color: white; }
.status-construction { background: rgba(212,136,15,0.88); color: white; }
.status-finished { background: rgba(100,100,100,0.75); color: white; }
.card-body { padding: 22px 24px 26px; }
.card-title { font-family: var(--font-display); font-size: 20px; font-weight: 600; margin-bottom: 6px; letter-spacing: -0.01em; }
.card-location { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--color-text-muted); margin-bottom: 14px; }
.card-meta { display: flex; align-items: center; gap: 16px; padding-top: 14px; border-top: 1px solid var(--color-border); }
.card-beds { font-size: 13px; color: var(--color-text-muted); font-weight: 500; }
.card-price { font-size: 15px; font-weight: 700; color: var(--color-primary); margin-left: auto; }

/* INFO SECTION */
.info-section { background: var(--color-primary); color: white; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 32px; }
.info-card { padding: 36px 32px; background: rgba(255,255,255,0.06); border-radius: var(--radius-lg); border: 1px solid rgba(255,255,255,0.08); }
.info-icon { width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; background: rgba(200,149,108,0.15); border-radius: var(--radius-md); margin-bottom: 20px; }
.info-icon svg { width: 26px; height: 26px; stroke: var(--color-accent-light); }
.info-card h3 { font-family: var(--font-display); font-size: 22px; margin-bottom: 10px; font-weight: 600; }
.info-card p { color: rgba(255,255,255,0.65); font-size: 14px; line-height: 1.6; }

/* PAGE HERO */
.page-hero { padding: 140px 0 60px; background: linear-gradient(160deg, var(--color-primary), #0D3A4A); color: white; margin-top: var(--header-height); }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(32px, 4vw, 48px); font-weight: 600; margin-bottom: 12px; letter-spacing: -0.02em; }
.page-hero p { color: rgba(255,255,255,0.65); font-size: 16px; }

/* PROJECT DETAIL */
.project-detail { padding-top: calc(var(--header-height) + 24px); padding-bottom: 80px; }
.breadcrumb { font-size: 13px; color: var(--color-text-muted); margin-bottom: 32px; padding: 16px 0; }
.breadcrumb a { color: var(--color-text-muted); }
.breadcrumb a:hover { color: var(--color-primary); }
.project-hero-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; margin-bottom: 56px; }

/* Gallery */
.gallery-main { position: relative; aspect-ratio: 16/10; border-radius: var(--radius-lg); overflow: hidden; background: var(--color-border); }
.gallery-item { position: absolute; inset: 0; opacity: 0; transition: opacity 0.4s ease; }
.gallery-item.active { opacity: 1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.85); border: none; width: 44px; height: 44px; border-radius: 50%; font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: 0.2s; color: var(--color-text); backdrop-filter: blur(4px); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-nav:hover { background: white; box-shadow: var(--shadow-md); }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 4px; }
.gallery-thumb { flex-shrink: 0; width: 72px; height: 54px; border-radius: var(--radius-sm); overflow: hidden; border: 2px solid transparent; cursor: pointer; opacity: 0.6; transition: 0.2s; background: none; padding: 0; }
.gallery-thumb.active, .gallery-thumb:hover { border-color: var(--color-accent); opacity: 1; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Project Summary */
.project-summary { display: flex; flex-direction: column; gap: 16px; }
.detail-status { display: inline-block; align-self: flex-start; padding: 6px 16px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; border-radius: var(--radius-sm); }
.project-summary h1 { font-family: var(--font-display); font-size: clamp(28px, 3vw, 38px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.project-location-detail { display: flex; align-items: center; gap: 8px; color: var(--color-text-muted); font-size: 15px; }
.project-key-info { display: flex; gap: 24px; padding: 24px; background: var(--color-bg); border-radius: var(--radius-md); margin-top: 8px; }
.key-item { display: flex; flex-direction: column; gap: 4px; }
.key-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--color-text-muted); font-weight: 500; }
.key-value { font-size: 18px; font-weight: 700; color: var(--color-text); }
.price-value { color: var(--color-primary); }
.project-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.project-actions .btn-outline { color: var(--color-text); border-color: var(--color-border); }
.project-actions .btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); background: rgba(27,77,92,0.05); }

/* Description */
.project-description { max-width: 840px; padding: 48px 0; border-top: 1px solid var(--color-border); }
.project-description h2 { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin-bottom: 24px; letter-spacing: -0.02em; }
.project-description p { color: var(--color-text-muted); font-size: 15px; line-height: 1.75; margin-bottom: 16px; }

/* CTA Bar */
.project-cta-bar { display: flex; align-items: center; justify-content: space-between; padding: 32px 40px; background: var(--color-primary); color: white; border-radius: var(--radius-lg); gap: 24px; }
.project-cta-bar p { font-size: 16px; color: rgba(255,255,255,0.8); }
.project-cta-bar .btn-primary { flex-shrink: 0; }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info h2 { font-family: var(--font-display); font-size: 28px; margin-bottom: 16px; }
.contact-info > p { color: var(--color-text-muted); margin-bottom: 32px; line-height: 1.6; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--color-border); }
.contact-item svg { flex-shrink: 0; color: var(--color-primary); margin-top: 2px; }
.contact-item a { color: var(--color-primary); font-weight: 500; }

/* FOOTER */
.site-footer { background: #0D1F26; color: rgba(255,255,255,0.7); padding: 64px 0 0; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 24px 48px; display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 48px; }
.footer-brand .logo-prime { color: white; }
.footer-brand .logo-costa { color: var(--color-accent-light); }
.footer-brand p { margin-top: 12px; font-size: 14px; line-height: 1.6; }
.footer-partner { margin-top: 8px; }
.footer-partner a { color: var(--color-accent-light); }
.footer-links h4, .footer-contact h4 { color: white; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 16px; }
.footer-links a { display: block; color: rgba(255,255,255,0.55); font-size: 14px; padding: 5px 0; transition: color 0.2s; }
.footer-links a:hover { color: white; }
.footer-contact p { font-size: 14px; line-height: 1.6; }
.footer-updated { margin-top: 8px; font-size: 12px; color: rgba(255,255,255,0.35); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); text-align: center; padding: 20px 24px; font-size: 13px; color: rgba(255,255,255,0.35); }
.footer-bottom a { color: var(--color-accent-light); }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .project-hero-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; gap: 32px; }
    .project-cta-bar { flex-direction: column; text-align: center; }
}
@media (max-width: 768px) {
    .main-nav { display: none; position: fixed; top: var(--header-height); left: 0; right: 0; background: white; flex-direction: column; padding: 24px; gap: 0; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow-lg); }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 14px 0; border-bottom: 1px solid var(--color-border); font-size: 16px; }
    .nav-toggle { display: flex; }
    .projects-grid { grid-template-columns: 1fr; }
    .hero { height: 70vh; min-height: 500px; }
    .hero h1 { font-size: 32px; }
    .hero-actions { flex-direction: column; align-items: center; }
}

/* WHATSAPP & AGENT */
.btn-whatsapp, .btn-whatsapp-hero {
    background: #25D366; color: white; border-color: #25D366;
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; font-size: 14px; font-weight: 600;
    font-family: var(--font-body); border-radius: var(--radius-xl);
    cursor: pointer; transition: all 0.25s ease; border: 2px solid #25D366;
    text-decoration: none; letter-spacing: 0.02em;
}
.btn-whatsapp:hover, .btn-whatsapp-hero:hover {
    background: #1da851; border-color: #1da851; color: white;
    transform: translateY(-1px); box-shadow: 0 6px 20px rgba(37,211,102,0.35);
}
.btn-outline-dark {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; font-size: 14px; font-weight: 600;
    font-family: var(--font-body); border-radius: var(--radius-xl);
    cursor: pointer; transition: all 0.25s ease; text-decoration: none;
    background: transparent; color: var(--color-text); border: 2px solid var(--color-border);
}
.btn-outline-dark:hover { border-color: var(--color-primary); color: var(--color-primary); }

.agent-card {
    background: var(--color-bg); border-radius: var(--radius-lg); padding: 24px;
    margin: 16px 0; border: 1px solid var(--color-border);
}
.agent-info { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.agent-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--color-primary); color: white;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 18px; flex-shrink: 0;
}
.agent-info h4 { font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.agent-role { font-size: 13px; color: var(--color-text-muted); margin-bottom: 4px; }
.agent-phones { font-size: 13px; }
.agent-phones a { color: var(--color-primary); font-weight: 500; }
.agent-card .btn-whatsapp { width: 100%; justify-content: center; }

.wa-floating {
    position: fixed; bottom: 24px; right: 24px; z-index: 90;
}
.wa-floating a {
    display: flex; align-items: center; justify-content: center;
    width: 60px; height: 60px; border-radius: 50%;
    background: #25D366; color: white; box-shadow: 0 4px 16px rgba(37,211,102,0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}
.wa-floating a:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37,211,102,0.5); }
.footer-wa { color: #25D366 !important; font-weight: 600; font-size: 14px; }
