/* =========================================================
   VoiceofPeople.in - Main Stylesheet
   Theme inspired by tvkitwing.com (deep red #990500, yellow #FFDD00)
   Mobile-first responsive design
   ========================================================= */

/* ---------- CSS Variables ---------- */
:root {
    --primary-red: #990500;
    --primary-red-dark: #660300;
    --primary-red-light: #c91a15;
    --accent-yellow: #FFDD00;
    --accent-yellow-dark: #e6c600;
    --white: #ffffff;
    --black: #000000;
    --gray-light: #f5f5f5;
    --gray-medium: #cccccc;
    --gray-dark: #333333;
    --whatsapp-green: #2AA81A;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);
    --transition: all 0.3s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Poppins', 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: var(--black);
    line-height: 1.6;
    background-color: var(--white);
    background-image:
        linear-gradient(135deg, rgba(153, 5, 0, 0.03) 0%, rgba(255, 221, 0, 0.03) 100%),
        radial-gradient(circle at 20% 10%, rgba(153, 5, 0, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 221, 0, 0.08) 0%, transparent 50%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    font-family: inherit;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--primary-red);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p {
    margin-bottom: 1rem;
}

.text-center { text-align: center; }
.text-tamil {
    font-family: 'Noto Sans Tamil', 'Latha', sans-serif;
}

/* ---------- Layout Containers ---------- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 3rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--accent-yellow));
    margin: 0.75rem auto 0;
    border-radius: 2px;
}

/* ---------- Top Bar ---------- */
.top-bar {
    background-color: var(--primary-red-dark);
    color: var(--white);
    font-size: 0.8rem;
    padding: 0.5rem 0;
}

.top-bar .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.top-bar a {
    color: var(--accent-yellow);
    transition: var(--transition);
}

.top-bar a:hover {
    color: var(--white);
}

/* ---------- Header & Navigation ---------- */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    color: var(--primary-red);
    font-size: 1.125rem;
}

.brand-logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-red), var(--accent-yellow));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 900;
    font-size: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.brand-text small {
    font-size: 0.7rem;
    color: var(--gray-dark);
    font-weight: 400;
}

.nav-toggle {
    display: block;
    background: none;
    padding: 0.5rem;
    color: var(--primary-red);
    font-size: 1.5rem;
    line-height: 1;
}

.nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 320px;
    height: 100vh;
    background-color: var(--white);
    box-shadow: var(--shadow-lg);
    transition: right 0.3s ease;
    padding: 4rem 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    z-index: 999;
}

.nav-menu.active {
    right: 0;
}

.nav-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    font-size: 1.75rem;
    color: var(--primary-red);
    line-height: 1;
}

.nav-link {
    display: block;
    padding: 0.875rem 1rem;
    color: var(--gray-dark);
    font-weight: 500;
    border-radius: 6px;
    border-left: 4px solid transparent;
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    background-color: rgba(153, 5, 0, 0.08);
    color: var(--primary-red);
    border-left-color: var(--primary-red);
}

.nav-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ---------- Hero Section ---------- */
.hero {
    position: relative;
    background:
        linear-gradient(135deg, rgba(153, 5, 0, 0.92) 0%, rgba(102, 3, 0, 0.88) 100%),
        radial-gradient(circle at 30% 20%, rgba(255, 221, 0, 0.15) 0%, transparent 50%);
    color: var(--white);
    padding: 3rem 1rem;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(45deg, transparent, transparent 40px, rgba(255, 221, 0, 0.03) 40px, rgba(255, 221, 0, 0.03) 80px);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    color: var(--white);
    font-size: 1.875rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
    line-height: 1.25;
}

.hero h1 .highlight {
    color: var(--accent-yellow);
    display: block;
    margin-top: 0.5rem;
}

.hero .subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.5;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.875rem;
    justify-content: center;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    text-align: center;
    min-height: 44px;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--accent-yellow);
    color: var(--primary-red-dark);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-red);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-red);
    border-color: var(--primary-red);
}

.btn-outline:hover {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-block {
    width: 100%;
}

/* ---------- Stats Strip ---------- */
.stats-strip {
    background: linear-gradient(90deg, var(--accent-yellow) 0%, #fff199 100%);
    padding: 1.5rem 1rem;
    border-top: 4px solid var(--primary-red);
    border-bottom: 4px solid var(--primary-red);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.stat-item {
    padding: 0.5rem;
}

.stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--primary-red-dark);
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--gray-dark);
    font-weight: 600;
    margin-top: 0.25rem;
}

/* ---------- Cards Grid ---------- */
.cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 2rem;
}

.card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 4px solid var(--primary-red);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-top-color: var(--accent-yellow);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-light));
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: 1.5rem auto 0.75rem;
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 1rem 1.5rem 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    color: var(--primary-red);
    margin-bottom: 0.5rem;
    font-size: 1.125rem;
}

.card-body p {
    color: var(--gray-dark);
    font-size: 0.875rem;
    flex-grow: 1;
}

.card-link {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    display: inline-block;
}

.card-link::after {
    content: ' \2192';
    transition: var(--transition);
}

.card-link:hover::after {
    margin-left: 4px;
}

/* ---------- About Section ---------- */
.about-section {
    background-color: var(--gray-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.about-text {
    padding: 0;
}

.about-text h2 {
    margin-bottom: 1rem;
}

.about-visual {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-light));
    border-radius: 12px;
    padding: 2rem;
    color: var(--white);
    text-align: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.about-visual::before {
    content: '\201C';
    position: absolute;
    top: -20px;
    left: 10px;
    font-size: 8rem;
    color: rgba(255, 221, 0, 0.15);
    font-family: Georgia, serif;
    line-height: 1;
}

.about-visual h3 {
    color: var(--accent-yellow);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
}

.about-visual p {
    position: relative;
    font-style: italic;
    font-size: 0.95rem;
}

/* ---------- Form Styles ---------- */
.form-wrapper {
    max-width: 700px;
    margin: 2rem auto 0;
    background-color: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    border-top: 5px solid var(--primary-red);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-group label .required {
    color: var(--primary-red);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--gray-medium);
    border-radius: 8px;
    transition: var(--transition);
    background-color: var(--white);
    min-height: 44px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(153, 5, 0, 0.1);
}

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

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23990500'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px;
    padding-right: 2.5rem;
}

.form-note {
    font-size: 0.8125rem;
    color: var(--gray-dark);
    margin-top: 0.25rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
}

.alert.show { display: block; }

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ---------- Issues/Needs Page Specific ---------- */
.page-header {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-dark) 100%);
    color: var(--white);
    padding: 3rem 1rem 2.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--accent-yellow), var(--white), var(--accent-yellow));
}

.page-header h1 {
    color: var(--white);
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.page-header p {
    font-size: 1rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto;
}

.breadcrumb {
    background-color: var(--gray-light);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}

.breadcrumb a {
    color: var(--primary-red);
    font-weight: 500;
}

.breadcrumb .separator {
    margin: 0 0.5rem;
    color: var(--gray-medium);
}

/* ---------- Testimonials ---------- */
.testimonial {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 5px solid var(--accent-yellow);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
}

.testimonial-text {
    font-style: italic;
    color: var(--gray-dark);
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.testimonial-author {
    font-weight: 700;
    color: var(--primary-red);
    font-size: 0.875rem;
}

.testimonial-author small {
    display: block;
    color: var(--gray-dark);
    font-weight: 400;
    margin-top: 2px;
}

/* ---------- Footer ---------- */
.footer {
    background-color: var(--primary-red-dark);
    color: var(--white);
    padding: 2.5rem 0 1rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.footer h4 {
    color: var(--accent-yellow);
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer p,
.footer a {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    line-height: 1.8;
}

.footer a {
    transition: var(--transition);
}

.footer a:hover {
    color: var(--accent-yellow);
}

.footer ul li {
    margin-bottom: 0.25rem;
}

.social-links {
    display: flex;
    gap: 0.625rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.social-links a:hover {
    background-color: var(--accent-yellow);
    color: var(--primary-red-dark);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-bottom a {
    color: var(--accent-yellow);
}

/* ---------- Back to Top Button ---------- */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--primary-red);
    color: var(--white);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100;
    border: 2px solid var(--accent-yellow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--accent-yellow);
    color: var(--primary-red);
}

/* ---------- WhatsApp Float ---------- */
.whatsapp-float {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background-color: var(--whatsapp-green);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: var(--shadow-md);
    z-index: 100;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    animation: none;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(42, 168, 26, 0.4); }
    50% { box-shadow: 0 4px 24px rgba(42, 168, 26, 0.8), 0 0 0 8px rgba(42, 168, 26, 0.2); }
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================================
   Responsive Breakpoints
   Mobile first — start small and scale up
   ========================================================= */

/* ---------- Small devices (landscape phones, 576px+) ---------- */
@media (min-width: 576px) {
    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }

    .hero { padding: 4rem 1rem; }
    .hero h1 { font-size: 2.25rem; }
    .hero .subtitle { font-size: 1.125rem; }

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

    .stat-number { font-size: 2rem; }

    .form-wrapper { padding: 2rem; }

    .page-header { padding: 4rem 1rem 3rem; }
    .page-header h1 { font-size: 2.5rem; }
}

/* ---------- Medium devices (tablets, 768px+) ---------- */
@media (min-width: 768px) {
    html { font-size: 16px; }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 1.5rem; }

    .section { padding: 4rem 0; }

    .hero { padding: 5rem 1.5rem; }
    .hero h1 { font-size: 2.75rem; }
    .hero .subtitle { font-size: 1.25rem; max-width: 700px; margin-left: auto; margin-right: auto; }

    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .about-content {
        grid-template-columns: 1.2fr 1fr;
        gap: 3rem;
    }

    .about-visual {
        padding: 3rem 2rem;
    }

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

    /* Desktop navigation */
    .nav-toggle, .nav-close { display: none; }

    .nav-menu {
        position: static;
        width: auto;
        height: auto;
        max-width: none;
        background-color: transparent;
        box-shadow: none;
        padding: 0;
        flex-direction: row;
        gap: 0.25rem;
    }

    .nav-link {
        padding: 0.625rem 1rem;
        border-left: none;
        border-bottom: 3px solid transparent;
        border-radius: 0;
    }

    .nav-link:hover,
    .nav-link.active {
        background-color: transparent;
        border-bottom-color: var(--primary-red);
    }

    .nav-overlay { display: none !important; }

    .brand-text { display: flex; }
    .brand { font-size: 1.25rem; }

    .page-header h1 { font-size: 2.75rem; }
}

/* ---------- Large devices (desktops, 992px+) ---------- */
@media (min-width: 992px) {
    .container { padding: 0 2rem; }

    h1 { font-size: 3rem; }
    h2 { font-size: 2.5rem; }

    .hero {
        padding: 6rem 2rem;
    }

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

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

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    .section { padding: 5rem 0; }
}

/* ---------- Extra large devices (1200px+) ---------- */
@media (min-width: 1200px) {
    h1 { font-size: 3.25rem; }
    .hero h1 { font-size: 3.5rem; }
    .cards-grid { gap: 2rem; }
}

/* ---------- Print styles ---------- */
@media print {
    .header, .footer, .back-to-top, .whatsapp-float, .hero-actions {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .whatsapp-float { animation: none; }
}
