/* ===== SOS PAGE SPECIFIC STYLES ===== */
/* Responsive design matching index.html approach */

/* ===== SCROLLABLE CONTAINER FOR SOS PAGE ===== */
/* Different approach from index.html - allows natural scrolling */
.container {
    /* Responsive width */
    width: clamp(320px, 98vw, 1600px) !important;
    height: auto !important; /* Auto height for content */
    min-height: 100vh !important; /* At least full viewport height */
    max-height: none !important; /* No height limit */
    
    /* Responsive padding */
    padding: clamp(0.3rem, 0.8vh, 0.8rem) clamp(0.5rem, 1vh, 1rem) clamp(0.8rem, 1.2vh, 1.2rem);
    
    /* Flexbox layout */
    display: flex;
    flex-direction: column;
    
    /* Scrolling behavior */
    overflow-y: visible !important;
    overflow-x: hidden;
    
    /* Natural positioning for scrollable content */
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: 0 auto !important;
    box-sizing: border-box;
}

/* Desktop viewport scaling adjustments */
@media (min-width: 1025px) {
    .container {
        width: clamp(320px, 98vw, 1600px);
        min-height: clamp(500px, 98vh, 1200px);
        height: clamp(500px, 98vh, 1200px);
        max-height: clamp(500px, 98vh, 1200px);
    }
}

/* Tablet responsive adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: clamp(0.3rem, 1.5vw, 0.8rem);
    }
}

.sos-button:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(229, 57, 53, 0.6);
    color: white;
}

.sos-button:active {
    transform: scale(0.95);
}/* Low resolution desktop adjustments */
@media (max-height: 650px) {
    .container {
        padding: 0.5rem;
        min-height: clamp(400px, 95vh, 650px);
        height: auto;
    }
}

@media (max-height: 600px) {
    .container {
        padding: 0.3rem;
        min-height: clamp(400px, 95vh, 600px);
        height: auto;
    }
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */
/* Using exact same values as index.html */
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 4rem); /* Same as index.html */
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.page-subtitle {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem); /* Same as index.html */
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ===== HEADER POSITIONING ===== */
.header-section {
    position: static;
    flex-shrink: 0;
}

.page-header {
    text-align: center;
    margin-bottom: clamp(20px, 4vh, 40px); /* Responsive margin */
}

/* ===== DESKTOP MENU POSITIONING ===== */
/* Desktop: Fixed position menus at top left and top right */
@media (min-width: 769px) {
    .mobile-vertical-menu {
        position: fixed !important;
        z-index: 1001 !important;
    }

    /* Left menu - always at top left */
    .mobile-vertical-menu.left {
        top: 10px !important;
        left: 10px !important;
        bottom: auto !important;
        right: auto !important;
        transform: translate3d(0, 0, 0) !important;
    }

    /* Right menu - always at top right */
    .mobile-vertical-menu.right {
        top: 10px !important;
        right: 10px !important;
        bottom: auto !important;
        left: auto !important;
        transform: translate3d(0, 0, 0) !important;
    }
}

/* ===== MOBILE MENU POSITIONING ===== */
/* Mobile: Same scrolling behavior as index.html */
@media (max-width: 768px) {
    .mobile-vertical-menu {
        position: fixed !important;
        z-index: 1001 !important;
    }

    /* Left mobile menu positioning */
    .mobile-vertical-menu.left {
        left: 10px !important;
        right: auto !important;
    }

    /* Right mobile menu positioning */
    .mobile-vertical-menu.right {
        right: 10px !important;
        left: auto !important;
    }

    /* Top position (default) */
    .mobile-vertical-menu.top-left,
    .mobile-vertical-menu.top-right {
        top: 10px !important;
        bottom: auto !important;
    }

    /* Middle position (when scrolled) */
    .mobile-vertical-menu.middle-left,
    .mobile-vertical-menu.middle-right {
        top: 50% !important;
        bottom: auto !important;
        transform: translateY(-50%) !important;
    }

    /* Bottom position (when scrolled to bottom) */
    .mobile-vertical-menu.bottom-left,
    .mobile-vertical-menu.bottom-right {
        top: auto !important;
        bottom: 10px !important;
        transform: translateY(0) !important;
    }
}

/* Ensure toggle menu icons are visible */

/* LEFT MENU - Show only cross-icon (plus) */
.menu-toggle-left .cross-line {
    background-color: #ffffff !important;
    width: 28px !important;
    height: 3px !important;
    border-radius: 2px !important;
    position: absolute !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.menu-toggle-left .cross-icon {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* RIGHT MENU - Show only dots-container (three dots) */
.menu-toggle .dot {
    background-color: #ffffff !important;
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    position: absolute !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.menu-toggle .dots-container {
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* RIGHT MENU - Hide cross-icon by default */
.menu-toggle .cross-icon {
    opacity: 0 !important;
    pointer-events: none !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* RIGHT MENU - Show cross-icon only when menu is open */
.menu-container.open .menu-toggle .cross-icon {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* RIGHT MENU - Hide dots when menu is open */
.menu-container.open .menu-toggle .dots-container {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ===== SOS BUTTON - RESPONSIVE ===== */
.sos-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(15px, 3vh, 25px); /* Reduced gap */
}

.sos-button {
    width: clamp(100px, 15vw, 160px); /* Reduced from 120px, 20vw, 200px */
    height: clamp(100px, 15vw, 160px); /* Reduced from 120px, 20vw, 200px */
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border: none;
    color: white;
    font-size: clamp(1rem, 2.2vw, 1.6rem); /* Reduced from 1.2rem, 3vw, 2rem */
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(229, 57, 53, 0.4);
    animation: pulse 2s infinite;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.sos-text {
    font-size: clamp(0.8rem, 2vw, 1.2rem); /* Reduced from 1rem, 2.5vw, 1.5rem */
    font-weight: 800;
    margin-bottom: 5px;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.sos-subtext {
    font-size: clamp(0.6rem, 1.4vw, 0.8rem); /* Reduced from 0.7rem, 1.8vw, 0.9rem */
    font-weight: 600;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@keyframes pulse {
    0% {
        box-shadow: 0 10px 30px rgba(229, 57, 53, 0.4);
    }
    50% {
        box-shadow: 0 10px 30px rgba(229, 57, 53, 0.8);
    }
    100% {
        box-shadow: 0 10px 30px rgba(229, 57, 53, 0.4);
    }
}

/* ===== EMERGENCY INFO - RESPONSIVE ===== */
.emergency-info {
    background: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: clamp(15px, 3vw, 25px); /* Reduced padding */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(198, 40, 40, 0.2);
    max-width: clamp(280px, 85vw, 550px); /* Reduced max-width */
    text-align: center;
}

.emergency-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.2rem, 2.8vw, 1.6rem); /* Reduced from 1.4rem, 3.5vw, 1.8rem */
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.emergency-content {
    color: #2c2c2c;
    font-weight: 500;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: clamp(0.85rem, 1.8vw, 1rem); /* Reduced from 1rem, 2.2vw, 1.1rem */
}

.emergency-list { 
    text-align: left; 
    margin: 20px 0; 
    color: #2c2c2c;
    font-weight: 500;
    font-size: clamp(0.8rem, 1.6vw, 0.95rem); /* Reduced from 0.9rem, 2vw, 1rem */
}

.emergency-contact {
    display: flex;
    justify-content: center;
    gap: clamp(8px, 2.5vw, 15px); /* Reduced gap */
    margin-top: 20px;
    flex-wrap: wrap;
}

.contact-button {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 600;
    padding: clamp(10px, 2vw, 12px) clamp(16px, 3vw, 24px); /* Reduced padding */
    border-radius: 25px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(198, 40, 40, 0.3);
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    font-size: clamp(0.8rem, 1.6vw, 0.9rem); /* Reduced from 0.9rem, 2vw, 1rem */
}

.contact-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(198, 40, 40, 0.4);
    color: white;
}

.contact-button:visited,
.contact-button:link,
.contact-button:active {
    color: white;
    text-decoration: none;
}

/* ===== BUTTON TEXT OVERRIDES (must come after design-fixes.css) ===== */
.sos-button,
.sos-button *,
.sos-button div,
.sos-button span {
    color: white !important;
}

.contact-button,
.contact-button *,
.contact-button div,
.contact-button span {
    color: white !important;
}

/* ===== DARK MODE CONTRAST IMPROVEMENTS ===== */
body.dark-mode .emergency-info {
    background: rgba(40, 40, 40, 0.95);
    border: 2px solid rgba(198, 40, 40, 0.4);
}

body.dark-mode .emergency-title {
    color: var(--primary-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .emergency-content,
body.dark-mode .emergency-list {
    color: #e0e0e0;
    font-weight: 500;
}

body.dark-mode .page-title {
    color: var(--primary-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .page-subtitle {
    color: #d0d0d0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== MOBILE RESPONSIVE DESIGN ===== */
/* Mobile Container Styles - matching index.html approach */
@media (max-width: 768px) {
    .container {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: clamp(0.25rem, 2vw, 1rem); /* Responsive padding */
        box-sizing: border-box;
        min-height: 100vh;
        height: auto;
        display: flex;
        flex-direction: column;
        position: relative;
        overflow-y: auto;
        border-radius: 0; /* Remove border radius on mobile */
    }

    .emergency-contact {
        flex-direction: column;
        align-items: center;
        gap: clamp(10px, 3vw, 15px);
    }

    .contact-button {
        width: 100%;
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: clamp(0.25rem, 1.5vw, 0.5rem);
    }
    
    .emergency-info {
        padding: clamp(15px, 3vw, 20px);
        margin: 0 10px;
    }
}

/* ===== SCROLLBAR STYLING ===== */
.main-content::-webkit-scrollbar {
    width: 6px;
}

.main-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.main-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
/* ===== MENU POSITIONING ===== */
/* Desktop menu positioning */
@media (min-width: 769px) {
    .mobile-vertical-menu {
        position: fixed;
        z-index: 1001;
    }

    .mobile-vertical-menu.left {
        top: 10px;
        left: 10px;
        bottom: auto;
        right: auto;
        transform: translate3d(0, 0, 0);
    }

    .mobile-vertical-menu.right {
        top: 10px;
        right: 10px;
        bottom: auto;
        left: auto;
        transform: translate3d(0, 0, 0);
    }
}

/* Mobile menu positioning */
@media (max-width: 768px) {
    .mobile-vertical-menu {
        position: fixed;
        z-index: 1001;
    }

    .mobile-vertical-menu.left {
        left: 10px;
        right: auto;
    }

    .mobile-vertical-menu.right {
        right: 10px;
        left: auto;
    }
}

/* ===== BUTTON TEXT OVERRIDES ===== */
.sos-button,
.sos-button *,
.sos-button div,
.sos-button span {
    color: white !important;
}

.contact-button,
.contact-button *,
.contact-button div,
.contact-button span {
    color: white !important;
}

/* ===== DARK MODE STYLES ===== */
body.dark-mode .emergency-info {
    background: rgba(40, 40, 40, 0.95);
    border: 2px solid rgba(198, 40, 40, 0.4);
}

body.dark-mode .emergency-title {
    color: var(--primary-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .emergency-content,
body.dark-mode .emergency-list {
    color: #e0e0e0;
    font-weight: 500;
}

body.dark-mode .page-title {
    color: var(--primary-light);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

body.dark-mode .page-subtitle {
    color: #d0d0d0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== SCROLLBAR STYLING ===== */
.container::-webkit-scrollbar {
    width: 6px;
}

.container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.container::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}
/* ===== LOW RESOLUTION SCALING FOR SCROLLABLE PAGES ===== */
@media (max-height: 700px) {
    html {
        font-size: 14px !important;
    }
    
    .container {
        transform: scale(0.9) !important;
        transform-origin: top center !important;
    }
}

@media (max-height: 600px) {
    html {
        font-size: 12px !important;
    }
    
    .container {
        transform: scale(0.8) !important;
        transform-origin: top center !important;
    }
}

@media (max-height: 500px) {
    html {
        font-size: 10px !important;
    }
    
    .container {
        transform: scale(0.7) !important;
        transform-origin: top center !important;
    }
}
