/*
 * NOBEL ADULT FAMILY HOME - MASTER STYLESHEET
 * High-End, Custom, Mobile-Responsive Design
 */

:root {
    --primary-color: #1b4d3e;     /* Deep Forest Green */
    --primary-dark: #0f2e25;
    --secondary-color: #c48b4d;   /* Rich Gold/Sand */
    --accent-color: #f4e1d2;      /* Soft Peach/Cream */
    --text-main: #2d3436;
    --text-muted: #636e72;
    --white: #ffffff;
    --off-white: #f9f9f9;
    --bg-light: #fdfaf5;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 6px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 50px rgba(0,0,0,0.12);
    --max-width: 100%;
    --header-height: 120px;
}

/* RESET & BASE */
* { margin: 0; padding: 0; box-sizing: border-box; outline: none; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body { 
    font-family: 'Inter', sans-serif; 
    color: var(--text-main); 
    line-height: 1.6; 
    overflow-x: hidden;
    background: var(--white);
    font-size: 16px;
    width: 100%;
}
h1, h2, h3, h4, h5, h6 { 
    font-family: 'Playfair Display', serif; 
    font-weight: 800; 
    line-height: 1.2;
    color: var(--primary-color);
}
a { text-decoration: none; color: inherit; transition: var(--transition); display: inline-block; }
ul { list-style: none; }
img { max-width: 100%; height: auto; display: block; border-radius: 4px; }

/* UTILITIES */
.container, .container-fluid { width: 100%; padding: 0 5%; margin: 0 auto; }
@media (min-width: 1800px) {
    .container { padding: 0 10%; }
}
.full-width { width: 100% !important; max-width: 100% !important; }
.edge-to-edge { width: 100%; padding: 0; }
.text-center { text-align: center; }
.text-white { color: var(--white) !important; }
.bg-primary { background: var(--primary-color); color: var(--white); }
.bg-light { background: var(--bg-light); }
.bg-white { background: var(--white); }

.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
.grid-m-2 { display: grid; } /* Class for forced 2-column mobile */

.section-padding { padding: 60px 0; }
.compact-padding { padding: 30px 0; }

.divider { width: 80px; height: 4px; background: var(--secondary-color); margin: 15px 0; border-radius: 2px; }
.divider.center { margin: 15px auto; }

/* BUTTONS */
.btn { 
    padding: 14px 32px; 
    border-radius: 4px; 
    font-weight: 700; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    font-size: 0.85rem; 
    border: none; 
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    display: inline-block;
    line-height: 1;
}
.btn-primary { background: var(--primary-color); color: var(--white) !important; }
.btn-primary:hover { background: var(--secondary-color); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--secondary-color); color: var(--white) !important; }
.btn-secondary:hover { background: var(--primary-color); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* HEADER */
.main-header { position: sticky; top: 0; width: 100%; z-index: 1000; box-shadow: var(--shadow-md); background: var(--white); }
.top-bar { background: var(--primary-dark); color: var(--white); padding: 8px 0; font-size: 0.8rem; font-weight: 500; }
.top-bar-content { display: flex; justify-content: flex-end; gap: 25px; align-items: center; }
.top-bar a { display: inline; color: inherit; }
.top-bar a:hover { color: var(--secondary-color); }

.navbar { padding: 15px 0; }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 12px; }
.logo img { height: 120px; }
.logo-text { font-size: 1.5rem; font-weight: 800; color: var(--primary-color); letter-spacing: -0.5px; }

.nav-links { display: flex; gap: 30px; align-items: center; margin-bottom: 0; }
.nav-links li { display: block; }
.nav-links a { font-weight: 700; color: var(--primary-color); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; position: relative; padding: 5px 0; }
.nav-links a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--secondary-color); transition: var(--transition); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover { color: var(--secondary-color); }

/* Navigation Button Redesign */
.nav-links .btn-primary {
    background: var(--secondary-color);
    color: var(--white) !important;
    padding: 14px 28px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(196, 139, 77, 0.3);
    border: 2px solid transparent;
    transition: var(--transition);
    line-height: 1;
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
}
.nav-links .btn-primary:hover {
    background: var(--primary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 77, 62, 0.4);
}
.nav-links .btn-primary::after { display: none; }

.nav-toggle { background: none; border: none; font-size: 1.6rem; color: var(--primary-color); cursor: pointer; display: none; padding: 5px; }

/* HERO SLIDER */
.hero { 
    height: 85vh; 
    min-height: 600px;
    display: flex; 
    align-items: center; 
    color: var(--white); 
    position: relative;
    overflow: hidden;
}
.hero-slides {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 0;
}
.hero-slides .slide {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideAnimation 15s infinite;
}
.hero-slides .slide:nth-child(2) { animation-delay: 5s; }
.hero-slides .slide:nth-child(3) { animation-delay: 10s; }

@keyframes slideAnimation {
    0% { opacity: 0; transform: scale(1); }
    10% { opacity: 1; }
    33% { opacity: 1; }
    43% { opacity: 0; transform: scale(1.1); }
    100% { opacity: 0; }
}

.hero-overlay { 
    position: absolute; 
    top: 0; left: 0; width: 100%; height: 100%; 
    background: linear-gradient(135deg, rgba(27,77,62,0.95) 0%, rgba(27,77,62,0.6) 100%); 
    z-index: 1;
}
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 850px; }
.hero h1 { font-size: 4.5rem; color: var(--white); margin-bottom: 20px; line-height: 1.1; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.hero p { font-size: 1.3rem; margin-bottom: 35px; opacity: 0.95; font-weight: 400; max-width: 700px; }

/* CASCADING IMAGES */
.cascading-images { position: relative; height: 550px; width: 100%; }
.cascading-img { 
    position: absolute; 
    border-radius: 8px; 
    box-shadow: var(--shadow-lg); 
    object-fit: cover; 
    border: 5px solid var(--white);
    transition: var(--transition);
}
.img-1 { width: 70%; height: 80%; top: 0; left: 0; z-index: 1; }
.img-2 { width: 60%; height: 70%; bottom: 0; right: 0; z-index: 2; }
.img-3 { width: 40%; height: 50%; top: 20%; left: 30%; z-index: 3; }
.cascading-images:hover .cascading-img { transform: scale(1.02); }

/* CARDS */
.card { 
    background: var(--white); 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: var(--shadow-sm); 
    border: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--secondary-color); }
.card i { font-size: 2.5rem; color: var(--secondary-color); margin-bottom: 20px; display: block; }

/* GALLERY */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.gallery-item { position: relative; overflow: hidden; border-radius: 8px; aspect-ratio: 1 / 1; box-shadow: var(--shadow-sm); background: #f0f0f0; }
.gallery-item a { display: block; width: 100%; height: 100%; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); display: block; }
.gallery-item:hover img { transform: scale(1.08); filter: brightness(1.1); }

input:focus, textarea:focus { border-color: var(--secondary-color) !important; background: #fff !important; outline: none; }

/* ALERTS */
.alert {
    padding: 15px 25px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    animation: fadeInDown 0.5s ease;
}
.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* FOOTER */
.main-footer { background: var(--primary-dark); color: rgba(255,255,255,0.8); padding: 70px 0 20px; border-top: 5px solid var(--secondary-color); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 40px; }
.footer-col h4 { color: var(--white); font-size: 1.2rem; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 1px; }
.footer-links li { margin-bottom: 12px; display: flex; align-items: center; gap: 10px; }
.footer-links a:hover { color: var(--secondary-color); transform: translateX(5px); }
.footer-bottom { margin-top: 50px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.85rem; opacity: 0.7; }

/* FLOATING CONTROLS */
.floating-contact { position: fixed; right: 30px; bottom: 30px; z-index: 9999; display: flex; flex-direction: column; gap: 20px; }
.floating-icon { 
    width: 65px; height: 65px; border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    color: var(--white) !important; font-size: 1.6rem; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: var(--transition);
    border: 3px solid #fff;
}
.floating-icon:hover { transform: scale(1.1) rotate(5deg); box-shadow: 0 15px 35px rgba(0,0,0,0.4); }
.floating-icon.phone { background: var(--primary-color); }
.floating-icon.whatsapp { background: #25d366; }
.floating-icon.email { background: #ea4335; }
.floating-icon.back-to-top { background: var(--secondary-color); display: none; }

.accessibility-widget { position: fixed; left: 30px; bottom: 30px; z-index: 9999; }
.access-toggle { 
    width: 65px; height: 65px; border-radius: 50%; background: #3498db; 
    color: var(--white); border: 3px solid #fff; font-size: 1.6rem; cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    transition: var(--transition);
}
.access-toggle:hover { transform: scale(1.1); background: #2980b9; }
.access-menu { 
    position: absolute; bottom: 70px; left: 0; background: var(--white); 
    padding: 20px; border-radius: 8px; box-shadow: var(--shadow-lg); 
    width: 260px; display: none; border: 1px solid #eee;
}
.access-menu.active { display: block; animation: fadeInUp 0.3s ease; }
.access-btn { 
    display: block; width: 100%; padding: 10px 15px; margin-bottom: 8px; 
    border: 1px solid #eee; background: var(--off-white); border-radius: 4px; 
    text-align: left; cursor: pointer; font-size: 0.85rem; font-weight: 600;
}
.access-btn:hover { background: var(--accent-color); border-color: var(--secondary-color); }

/* ANIMATIONS */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
[data-animate] { opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out; }
[data-animate].visible { opacity: 1; transform: translateY(0); }

.grid-gap-lg { gap: 80px; }
.grid-gap-md { gap: 60px; }

/* RESPONSIVE */
@media (max-width: 1400px) {
    .hero h1 { font-size: 3.8rem; }
}

@media (max-width: 1100px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .hero h1 { font-size: 3.2rem; }
    .grid-gap-lg { gap: 40px !important; }
    .grid-gap-md { gap: 30px !important; }
}

@media (max-width: 850px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; gap: 30px !important; }
    .grid-6 { grid-template-columns: repeat(2, 1fr); gap: 15px; }
    .grid-m-2 { grid-template-columns: repeat(2, 1fr) !important; gap: 15px !important; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .nav-toggle { display: block; }
    .nav-links { 
        display: none; 
        position: absolute; 
        top: 100%; 
        left: 0; 
        width: 100%; 
        background: var(--white); 
        flex-direction: column; 
        padding: 30px; 
        box-shadow: var(--shadow-lg); 
        gap: 20px;
        z-index: 1000;
        border-top: 1px solid #eee;
    }
    .nav-links.active { display: flex; animation: fadeInUp 0.3s ease; }
    .nav-links li { width: 100%; text-align: center; }
    .nav-links a { font-size: 1.1rem; width: 100%; display: block; }
    .hero { height: auto; padding: 150px 0 80px; }
    .hero h1 { font-size: 2.5rem; }
    .cascading-images { height: 350px; margin-top: 50px; }
    .section-padding { padding: 50px 0; }
    .top-bar-content { justify-content: center; }
}

@media (max-width: 500px) {
    .grid-m-2 { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .logo-text { font-size: 1.1rem; }
    .logo img { height: 75px; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .top-bar { padding: 8px 0; }
    .top-bar-content { 
        flex-direction: row; 
        flex-wrap: wrap;
        justify-content: center; 
        gap: 8px 15px; 
        font-size: 0.8rem; 
    }
    .top-bar .contact-info.phone-info { 
        flex-basis: 100%; 
        text-align: center; 
        font-weight: 800; 
        font-size: 1.15rem;
        margin-bottom: 5px;
        display: block;
        width: 100%;
    }
    .top-bar .contact-info.email-info, 
    .top-bar .contact-info.map-info {
        font-size: 0.75rem;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
    
    .section-padding { padding: 40px 0; }
    .compact-padding { padding: 25px 0; }
    .btn { padding: 12px 24px; font-size: 0.8rem; }
    
    .card { padding: 15px 10px !important; overflow: hidden; }
    .card h3 { font-size: 1rem !important; line-height: 1.2; margin-bottom: 10px !important; }
    .card h4 { font-size: 0.95rem !important; margin-bottom: 8px !important; }
    .card p { font-size: 0.8rem !important; line-height: 1.4; margin-bottom: 15px !important; }
    .card ul li { font-size: 0.75rem !important; gap: 15px !important; margin-bottom: 8px !important; align-items: flex-start; }
    .card ul li i { margin-top: 2px; font-size: 0.95rem !important; width: 20px !important; }
    
    .floating-contact { right: 10px; bottom: 80px; gap: 10px; }
    .accessibility-widget { left: 10px; bottom: 80px; }
    .floating-icon, .access-toggle { width: 45px; height: 45px; font-size: 1.1rem; border-width: 2px; }
    .access-menu { bottom: 55px; left: 0; width: 200px; padding: 15px; }
    
    /* Ensure no horizontal scroll */
    html, body { overflow-x: hidden; position: relative; width: 100%; }
}

/* FAQ ACCORDION */
.faq-container { max-width: 900px; margin: 0 auto; }
.faq-item { background: var(--white); border-radius: 12px; margin-bottom: 20px; box-shadow: var(--shadow-sm); border: 1px solid #f0f0f0; overflow: hidden; transition: var(--transition); }
.faq-header { padding: 25px 30px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: var(--transition); }
.faq-header h3 { font-size: 1.2rem; margin: 0; color: var(--primary-color); display: flex; align-items: center; gap: 15px; }
.faq-header i.toggle-icon { font-size: 1.1rem; color: var(--secondary-color); transition: var(--transition); }
.faq-content { padding: 0 30px; max-height: 0; overflow: hidden; transition: all 0.5s cubic-bezier(0, 1, 0, 1); background: #fafafa; }
.faq-content p { padding: 25px 0; color: var(--text-muted); line-height: 1.8; margin-left: 40px; }
.faq-item.active { border-color: var(--secondary-color); box-shadow: var(--shadow-md); }
.faq-item.active .faq-header { background: var(--bg-light); }
.faq-item.active i.toggle-icon { transform: rotate(180deg); }
.faq-item.active .faq-content { max-height: 1000px; transition: all 0.5s cubic-bezier(1, 0, 1, 0); }

/* ACCESSIBILITY MODES */
body.dark-mode { background: #121212; color: #e0e0e0; }
body.dark-mode .bg-light, body.dark-mode .bg-white, body.dark-mode .navbar, body.dark-mode .card, body.dark-mode .access-menu { 
    background: #1e1e1e !important; color: #e0e0e0 !important; border-color: #333; 
}
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 { color: var(--secondary-color); }

body.high-contrast { background: #000 !important; color: #fff !important; }
body.high-contrast * { border-color: #fff !important; color: #fff !important; background: #000 !important; }
body.high-contrast .btn { border: 2px solid #fff !important; }

body.dyslexic-font { font-family: 'OpenDyslexic', sans-serif !important; }
