/* ============================================
   Rondanini Publishing™ - Professional Landing Page
   ============================================ */

/* CSS Variables for theming */
:root {
    --primary-color: #1a1a2e;
    --secondary-color: #16213e;
    --accent-color: #0f3460;
    --highlight-color: #e94560;
    --text-primary: #f1f1f1;
    --text-secondary: #b0b0b0;
    --text-dark: #1a1a2e;
    --card-bg: rgba(255, 255, 255, 0.98);
    --border-color: rgba(0, 0, 0, 0.06);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
    --gradient-1: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-2: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-3: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --gradient-4: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #fafafa;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* Background Elements */
.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, 
        rgba(102, 126, 234, 0.05) 0%, 
        rgba(118, 75, 162, 0.05) 50%,
        rgba(233, 69, 96, 0.05) 100%);
    z-index: -2;
    pointer-events: none;
}

.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(233, 69, 96, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(75, 175, 254, 0.1) 0%, transparent 50%);
    z-index: -1;
    pointer-events: none;
    animation: meshMove 20s ease-in-out infinite;
}

@keyframes meshMove {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo-section {
    flex: 1;
}

.company-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    letter-spacing: -0.5px;
}

.company-name sup {
    font-size: 0.5em;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: var(--text-secondary);
}

.company-tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.main-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-toggle {
    background: none;
    border: 2px solid var(--border-color);
    padding: 0.6rem;
    border-radius: 0.5rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-toggle:hover {
    border-color: var(--highlight-color);
    color: var(--highlight-color);
    transform: translateY(-2px);
}

/* Search Bar */
.search-bar {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    position: relative;
}

.search-bar.active {
    max-height: 500px;
    padding: 1rem 0;
}

#searchInput {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition-smooth);
    background: white;
}

#searchInput:focus {
    outline: none;
    border-color: var(--highlight-color);
    box-shadow: 0 0 0 4px rgba(233, 69, 96, 0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 1rem;
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    display: none;
}

.search-results.active {
    display: block;
}

.search-result-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(233, 69, 96, 0.05);
}

/* Hero Section */
.hero {
    padding: 5rem 0;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    line-height: 1.8;
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Filter Section */
.filter-section {
    padding: 2rem 0;
    background: white;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 89px;
    z-index: 999;
    backdrop-filter: blur(10px);
}

.filter-tabs {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 2rem;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-smooth);
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
}

.filter-tab:hover {
    border-color: var(--highlight-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.filter-tab.active {
    background: var(--highlight-color);
    color: white;
    border-color: var(--highlight-color);
}

/* Main Content */
.main-content {
    padding: 4rem 0 6rem;
}

.properties-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Category Headers */
.category-header {
    grid-column: 1 / -1;
    padding: 2rem 0 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-top: 2rem;
}

.category-header:first-child {
    margin-top: 0;
}

.category-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.category-header p {
    font-size: 1rem;
    color: var(--text-secondary);
}

.category-header.hidden {
    display: none;
}

/* Property Cards */
.property-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 1.25rem;
    padding: 2rem;
    transition: var(--transition-smooth);
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1.5rem;
    align-items: start;
    position: relative;
    overflow: hidden;
}

.property-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--gradient-1);
    transition: height 0.3s ease;
}

.property-card:hover::before {
    height: 100%;
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(233, 69, 96, 0.2);
}

.property-card.hidden {
    display: none;
}

/* Card Icon */
.card-icon {
    width: 64px;
    height: 64px;
    background: var(--gradient-1);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    transition: var(--transition-bounce);
}

.property-card:hover .card-icon {
    transform: rotate(5deg) scale(1.05);
}

.property-card:nth-child(4n+1) .card-icon { background: var(--gradient-1); }
.property-card:nth-child(4n+2) .card-icon { background: var(--gradient-2); }
.property-card:nth-child(4n+3) .card-icon { background: var(--gradient-3); }
.property-card:nth-child(4n+4) .card-icon { background: var(--gradient-4); }

/* Card Content */
.card-content {
    flex: 1;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card Link */
.card-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 0.75rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.card-link:hover {
    background: var(--highlight-color);
    transform: translateX(4px);
}

.card-link svg {
    transition: var(--transition-smooth);
}

.card-link:hover svg {
    transform: translateX(4px);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--text-primary);
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section h5 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.footer-section p {
    color: var(--text-secondary);
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-smooth);
    display: inline-block;
}

.footer-section a:hover {
    color: var(--highlight-color);
    transform: translateX(4px);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (min-width: 768px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .properties-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
    
    .stats-row {
        gap: 2rem;
        flex-wrap: wrap;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .company-name {
        font-size: 1.5rem;
    }
    
    .property-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card-icon {
        width: 56px;
        height: 56px;
    }
    
    .card-link {
        justify-self: start;
    }
    
    .filter-tabs {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .filter-section {
        top: 73px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.property-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.property-card:nth-child(1) { animation-delay: 0.1s; }
.property-card:nth-child(2) { animation-delay: 0.2s; }
.property-card:nth-child(3) { animation-delay: 0.3s; }
.property-card:nth-child(4) { animation-delay: 0.4s; }
.property-card:nth-child(5) { animation-delay: 0.5s; }
.property-card:nth-child(6) { animation-delay: 0.6s; }

/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Print Styles */
@media print {
    .header,
    .filter-section,
    .footer {
        display: none;
    }
    
    .property-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
