/* =====================================================================
   Tharaka Housing Apartments Public Site — Modern Redesign
   Shared stylesheet for about.php, portfolio.php, blog.php, contact.php.
   Loaded AFTER the original style.css so these rules override.
   ===================================================================== */

/* ---------- 1. Hero banner (shared across inner pages) ---------- */
.hero-modern {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 40%, #0f3460 100%);
    min-height: 320px;
}
.hero-modern::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212,175,55,.2) 0%, transparent 70%);
}
.hero-modern::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(108,92,231,.15) 0%, transparent 70%);
}
.hero-modern .hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 30px;
    text-align: center;
}
.hero-modern h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    letter-spacing: .02em;
}
.hero-modern .hero-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 17px;
    color: rgba(255,255,255,.7);
    font-weight: 300;
    letter-spacing: .01em;
}
.hero-modern .hero-accent {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #f3d27a);
    margin: 18px auto 0;
    border-radius: 3px;
}

/* ---------- 3. Content sections ---------- */
.section-modern {
    padding: 70px 0;
}
.section-alt {
    background: #f8f9fc;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}
.section-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 10px;
}
.section-header .accent-bar {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #6c5ce7, #d4af37);
    margin: 0 auto 16px;
    border-radius: 3px;
}
.section-header p {
    font-size: 16px;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---------- 4. Content body (CMS editable area) ---------- */
.cms-body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.8;
    color: #374151;
}
.cms-body p {
    margin-bottom: 20px;
    color: #4b5563;
}
.cms-body h2, .cms-body h3 {
    font-family: 'Montserrat', sans-serif;
    color: #1a1a2e;
    margin-top: 30px;
    margin-bottom: 14px;
}
.cms-body a {
    color: #6c5ce7;
    text-decoration: underline;
}
.cms-body a:hover {
    color: #d4af37;
}
.cms-body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
}
.cms-body ul, .cms-body ol {
    padding-left: 24px;
    margin-bottom: 20px;
}
.cms-body li {
    margin-bottom: 8px;
    color: #4b5563;
}

/* ---------- 5. Feature cards (about page) ---------- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin-top: 40px;
}
.feature-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,.05);
    border: 1px solid rgba(0,0,0,.04);
    transition: all .3s ease;
    text-align: center;
}
.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(0,0,0,.1);
}
.feature-card .icon-wrap {
    width: 72px;
    height: 72px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    margin: 0 auto 20px;
    font-size: 28px;
}
.feature-card h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 10px;
}
.feature-card p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
}

/* ---------- 6. Stat counters (about page) ---------- */
.stats-modern {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: 60px 0;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 30px;
    text-align: center;
}
.stat-item .stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 42px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1;
}
.stat-item .stat-label {
    font-size: 14px;
    color: rgba(255,255,255,.6);
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

/* ---------- 7. Property cards (portfolio page, CSS flip) ---------- */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}
.property-card {
    border-radius: 16px;
    overflow: hidden;
}
/* Flip shell (matches the css flip card effect reference) */
.flip-card {
    perspective: 2200px;
    background: transparent;
    border: 0;
    box-shadow: none;
    cursor: pointer;
}
.flip-card .flip-inner {
    position: relative;
    width: 100%;
    height: 470px;
    transform-style: preserve-3d;
    transition: transform .8s ease-in-out;
}
.flip-card:hover .flip-inner {
    transform: rotateY(180deg);
}
.flip-card .flip-front,
.flip-card .flip-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
}
.flip-card .flip-front {
    box-shadow: 0 4px 24px rgba(0,0,0,.06);
    border: 1px solid rgba(0,0,0,.04);
}
.flip-card .flip-back {
    background: linear-gradient(160deg, #1e1b2e 0%, #14121c 100%);
    color: #fff;
    transform: rotateY(180deg);
    box-shadow: 0 20px 40px rgba(0,0,0,.10);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.property-card .card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.flip-front-label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 34px 22px 16px;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.62) 100%);
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
}
.flip-hint {
    font-family: 'Open Sans', sans-serif;
    font-size: 10.5px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255,255,255,.72);
    white-space: nowrap;
}
.property-card .card-body {
    padding: 24px;
}
.property-card h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}
.flip-back h4 {
    color: #fff;
}
.property-card .card-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 14px;
}
.flip-back .card-meta {
    color: #c9c4d8;
}
.property-card .card-meta i {
    color: #d4af37;
    margin-right: 5px;
}
.property-card .card-price {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #6c5ce7;
}
.flip-back .card-price {
    color: var(--gl-gold, #d4af37);
    text-shadow: 0 0 18px rgba(212,175,55,.25);
    margin-bottom: 6px;
}
.property-card .card-price span {
    font-size: 13px;
    font-weight: 400;
    color: #9ca3af;
}
.flip-back .card-price span {
    color: #a29ab8;
}
.property-card .badge-status {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.badge-vacant { background: #d1fae5; color: #065f46; }
.badge-occupied { background: #fee2e2; color: #991b1b; }
.property-card .card-type {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6c5ce7;
    background: rgba(108,92,231,.08);
    border: 1px solid rgba(108,92,231,.25);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
}
.flip-back .card-type {
    color: var(--gl-gold, #d4af37);
    border-color: rgba(212,175,55,.3);
    background: rgba(212,175,55,.08);
}

/* ---------- 8. Blog cards ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}
.blog-card {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,.05);
    border: 1px solid rgba(0,0,0,.04);
    transition: all .3s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.1);
}
.blog-card h4 {
    font-family: 'Montserrat', sans-serif;
    font-size: 19px;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 12px;
}
.blog-card h4 a {
    color: inherit;
    text-decoration: none;
}
.blog-card h4 a:hover {
    color: #6c5ce7;
}
.blog-card .blog-excerpt {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 18px;
}
.blog-card .blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #9ca3af;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}
.blog-card .blog-meta .author {
    font-weight: 600;
    color: #d4af37;
}

.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}
.blog-empty i {
    font-size: 48px;
    color: #d1d5db;
    margin-bottom: 16px;
    display: block;
}

/* ---------- 9. Contact form (contact page) ---------- */
.contact-form-modern {
    max-width: 650px;
    margin: 0 auto;
}
.contact-form-modern input[type="text"],
.contact-form-modern input[type="email"],
.contact-form-modern textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Open Sans', sans-serif;
    transition: border-color .2s, box-shadow .2s;
    margin-bottom: 18px;
    background: #fafafa;
}
.contact-form-modern input:focus,
.contact-form-modern textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 4px rgba(108,92,231,.1);
    background: #fff;
}
.contact-form-modern input[type="submit"] {
    background: linear-gradient(135deg, #6c5ce7, #5843d6);
    color: #fff;
    border: none;
    padding: 14px 40px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
}
.contact-form-modern input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108,92,231,.3);
}

/* ---------- 9b. Booking page ---------- */
.summary-modern {
    background: linear-gradient(160deg, #1e293b, #0f172a);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 16px;
    padding: 22px;
    color: #cbd5e1;
}
.summary-modern h4 {
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    margin: 0 0 4px;
}
.summary-modern .text-muted i {
    color: #d4af37;
    width: 18px;
}
.form-modern {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 26px;
    box-shadow: 0 10px 30px rgba(15,23,42,.06);
}
.form-modern .form-control {
    border-radius: 10px;
}
.confirm-card {
    text-align: center;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 40px 26px;
    box-shadow: 0 10px 30px rgba(15,23,42,.06);
}
.confirm-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    font-size: 30px;
    line-height: 68px;
}
.confirm-ref {
    display: inline-block;
    background: #f5f3ff;
    border: 1px dashed #c4b5fd;
    color: #6c5ce7;
    padding: 8px 18px;
    border-radius: 30px;
    margin: 6px 0 14px;
    font-size: 14px;
}

/* ---------- 10. Responsive ---------- */
@media (max-width: 768px) {
    .hero-modern { min-height: 260px; }
    .hero-modern h1 { font-size: 28px; }
    .hero-modern .hero-subtitle { font-size: 15px; }
    .hero-modern .hero-content { padding: 50px 20px; }
    .section-header h2 { font-size: 26px; }
    .feature-grid { grid-template-columns: 1fr; }
    .property-grid { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
