/* Women Safety Analytics - Main Stylesheet */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Modern Women-Empowerment Color Palette */
    --primary-purple: #6C5CE7;        /* Empowerment Purple */
    --secondary-pink: #FF6FA5;        /* Soft Pink */
    --button-pink: #E84393;           /* Rose Pink */
    --hover-purple: #5A4BD6;          /* Deep Purple */
    --light-lavender: #F8F7FF;        /* Light Lavender Background */
    --text-dark: #2D3436;             /* Dark Gray Text */
    --text-light: #666;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --border-color: #e0e0e0;
    
    /* Legacy variable mappings for compatibility */
    --primary-pink: #6C5CE7;
    --light-pink: #F8F7FF;
    --dark-pink: #5A4BD6;
    --accent-pink: #FF6FA5;
    --soft-pink: #F8F7FF;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-purple), var(--hover-purple));
    color: white;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(108, 92, 231, 0.2);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
   
}

.logo {
    font-size:2rem;
    font-weight: bold;
    text-decoration: none;
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.nav-menu a:hover{
    color: var(--secondary-pink);
}
.nav-link.active{
    background-color: rgba(255, 111, 165, 0.2);
    color: var(--secondary-pink);
}
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* 3 per row */
  gap: 2rem;
}

.feature {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.feature .icon {
  width: 80px;
  height: 80px;
  background: #E8D4F8;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

/* Responsive design */
@media (max-width: 900px) {
  .feature-grid {
    grid-template-columns: repeat(2, 1fr); /* 2 per row */
  }
}

@media (max-width: 600px) {
  .feature-grid {
    grid-template-columns: 1fr; /* 1 per row */
  }
}

.section {
  margin: 4rem 2rem;
}

.section h2 {
  text-align: center;
  color: var(--primary-purple);
  margin-bottom: 2.5rem;
}

.grid-3, .grid-2 {
  display: grid;
  gap: 2rem;
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

/* Proper 3-up 3-down grid for defence poses */
.grid-3 {
    grid-template-columns: repeat(3, 1fr);
  
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
    
    
}
.emergency-btn {
    position: fixed;          /* stays fixed while scrolling */
    bottom: 30px;             /* distance from bottom */
    left: 94%;                /* center horizontally */
   /* true centering */
    background: var(--button-pink); /* rose pink theme */
    color: white;
    font-size: 2rem;
    border: none;
    border-radius: 50%;
    padding: 18px 22px;
    box-shadow: 0 6px 20px rgba(232, 67, 147, 0.3);
    text-decoration: none;  /* if you use <a> */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Hover effect */
.emergency-btn:hover {
    background: #C9235F;
    
}

.card {
  background: #fff;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.card h3, .card h4 {
  color: var(--primary-pink);
  margin-bottom: 1rem;
}

.card ul, .card ol {
  margin: 0 0 1rem 1.5rem;
  line-height: 1.6;
}

.alert {
  background: #F0E7FF;
  padding: 1rem;
  border-left: 4px solid var(--primary-purple);
  border-radius: 6px;
}

/* Responsive */
@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
}


/* Main Content */
main {
    margin-top: 80px;
    min-height: calc(100vh - 160px);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero1 {
    position: relative;
    width: 100%;
    min-height: 80vh; /* makes the hero section tall enough */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ad1457; /* text color on background image */
    padding: 4rem 2rem;

    /* Background image settings */
    background-image: url('../images/bg.jpeg'); /* replace with your image path */
    background-size: cover;       /* cover whole section */
    background-position: center;  /* center the image */
    background-repeat: no-repeat; /* don't repeat */
    background-attachment: fixed; /* optional: parallax effect */
}

/* Optional: make heading & paragraph stand out with semi-transparent overlay */
.hero1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* background: rgba(0, 0, 0, 0.5); black overlay with 50% opacity */
    z-index: 0;
}

.hero1 .container1 {
    position: relative;
    z-index: 1;
    margin-top: -120px;                 /* moves content upward by 50px */
}

.hero1 h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero1 p {
    color: #ffffff;                     /* white text */
    font-weight: bold;                  /* bold text */
    font-size: 1.2rem;
    max-width: 800px;                   /* limits paragraph width */
    margin: 0 auto 2rem;
}


.hero1 .btn {
    margin: 0 0.5rem;
}


.hero {
    background: var(--light-lavender);
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    color: var(--b);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--button-pink);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 0.5rem;
}

.btn:hover {
    background-color: var(--primary-purple);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.3);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--primary-purple);
    background-color: #ffffff;
    color: var(--primary-purple);
}

.btn-secondary:hover {
    background-color: var(--light-lavender);
    color: var(--primary-purple);
}

/* Cards */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin: 1rem 0;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(233, 30, 99, 0.15);
}

.card h3 {
    color: var(--primary-purple);
    margin-bottom: 1rem;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

/* Tables */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--primary-purple);
    color: white;
    font-weight: 600;
}

tr:hover {
    background-color: var(--light-lavender);
}

/* Alerts */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.alert-success {
    background-color: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.alert-info {
    background-color: var(--light-lavender);
    border-color: var(--primary-purple);
    color: var(--primary-purple);
}

/* Statistics Cards */
.stat-card {
    text-align: center;
    padding: 2rem;
    background: linear-gradient(135deg, var(--primary-purple), var(--hover-purple));
    color: white;
    border-radius: 10px;
    margin: 1rem 0;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Emergency Button */
.emergency-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: var(--button-pink);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 5px 15px rgba(232, 67, 147, 0.3);
    transition: all 0.3s ease;
}

.emergency-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(232, 67, 147, 0.5);
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
   
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--secondary-pink);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
    line-height: 2;
}

.footer-section a:hover {
    color: var(--secondary-pink);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #aaa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-purple);
        flex-direction: column;
        padding: 1rem 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .mobile-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    nav {
        padding: 0 1rem;
    }

    .container {
        padding: 0 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .emergency-btn {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(108, 92, 231, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-purple);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Dashboard Specific Styles */
.dashboard-header {
    background: var(--light-lavender);
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Map Container */
.map-container {
    height: 400px;
    background-color: var(--light-gray);
    border-radius: 10px;
    border: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-light);
}

/* Progress Bars */
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-purple), var(--hover-purple));
    transition: width 0.3s ease;
}