/**
 * R. Elias Permit Services - Main Stylesheet
 * Colors: Navy #1e3a5f, Gold #c9a227
 */

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

:root {
    --navy: #1e3a5f;
    --navy-dark: #152a45;
    --navy-light: #2a4a73;
    --gold: #c9a227;
    --gold-light: #ddb94a;
    --gold-dark: #a88520;
    --white: #ffffff;
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #adb5bd;
    --gray-500: #868e96;
    --gray-600: #495057;
    --gray-700: #343a40;
    --gray-800: #212529;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
    --font-body: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: Georgia, 'Times New Roman', serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --radius: 6px;
    --radius-lg: 10px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--gray-700);
    background: var(--white);
}

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

a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--gold);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.3;
    color: var(--navy);
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1rem;
}

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

.section {
    padding: 4rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold);
}

.section-title p {
    color: var(--gray-500);
    margin-top: 0.5rem;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: box-shadow 0.3s;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--navy);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--navy);
    color: var(--gold);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.nav-desktop {
    display: none;
}

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

.nav-desktop a {
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-desktop a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s;
}

.nav-desktop a:hover::after,
.nav-desktop a.active::after {
    width: 100%;
}

.nav-desktop a.active {
    color: var(--gold);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-portal {
    display: none;
}

.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--navy);
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation */
.nav-mobile {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transform: translateY(-150%);
    transition: transform 0.3s;
    z-index: 999;
}

.nav-mobile.open {
    transform: translateY(0);
}

.nav-mobile ul {
    list-style: none;
}

.nav-mobile li {
    border-bottom: 1px solid var(--gray-200);
}

.nav-mobile a {
    display: block;
    padding: 1rem 0;
    font-weight: 500;
}

.nav-mobile a.active {
    color: var(--gold);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--navy-light);
    color: var(--white);
}

.btn-accent {
    background: var(--gold);
    color: var(--navy-dark);
}

.btn-accent:hover {
    background: var(--gold-light);
}

.btn-outline {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}

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

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    padding: 8rem 0 5rem;
    overflow: hidden;
}

.hero-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-grid {
    display: grid;
    gap: 3rem;
    align-items: center;
}

.hero-content h1 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-content h1 span {
    color: var(--gold);
}

.hero-content p {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.15);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.9);
}

.trust-item i {
    color: var(--gold);
    font-size: 1.25rem;
    width: 24px;
    text-align: center;
}

.hero-visual {
    display: none;
}

/* Services Preview */
.services-preview {
    background: var(--gray-50);
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.service-icon {
    width: 56px;
    height: 56px;
    background: var(--navy);
    color: var(--gold);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.25rem;
}

.service-card h3 {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.service-card p {
    color: var(--gray-500);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
}

.service-card a {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.service-card a:hover {
    color: var(--gold);
}

/* Process Section */
.process-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    counter-reset: process;
}

.process-step {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.process-step::before {
    counter-increment: process;
    content: counter(process);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: var(--gold);
    color: var(--navy-dark);
    font-weight: 700;
    font-size: 1.25rem;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
}

.process-step h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.process-step p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

/* CTA Section */
.cta-section {
    background: var(--navy);
    color: var(--white);
    text-align: center;
    padding: 4rem 0;
}

.cta-section h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

.cta-section p {
    color: rgba(255,255,255,0.85);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Content Pages */
.page-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    color: var(--white);
    padding: 6rem 0 3rem;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 0.5rem;
}

.page-header p {
    color: rgba(255,255,255,0.85);
}

.page-content {
    padding: 3rem 0;
}

.content-block {
    max-width: 800px;
    margin: 0 auto;
}

.content-block h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.content-block ul {
    margin-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-block li {
    margin-bottom: 0.5rem;
}

/* Services Page */
.services-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.service-detail {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: box-shadow 0.3s;
}

.service-detail:hover {
    box-shadow: var(--shadow-md);
}

.service-detail h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.service-detail h3 i {
    color: var(--gold);
}

.service-detail p {
    color: var(--gray-500);
    margin-bottom: 0;
}

/* Contact Form */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact-info-card {
    background: var(--navy);
    color: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
}

.contact-info-card h3 {
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-info-item i {
    color: var(--gold);
    font-size: 1.25rem;
    margin-top: 0.25rem;
    width: 24px;
    text-align: center;
}

.contact-info-item strong {
    display: block;
    margin-bottom: 0.25rem;
}

.contact-info-item span,
.contact-info-item a {
    color: rgba(255,255,255,0.85);
    font-size: 0.9375rem;
}

.contact-info-item a:hover {
    color: var(--gold);
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

.form-error {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

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

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

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    padding: 2rem 1rem;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
}

.login-card .logo {
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 0.25rem;
}

.login-card .subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

.login-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: var(--gray-100);
    padding: 0.25rem;
    border-radius: var(--radius);
}

.login-tab {
    flex: 1;
    text-align: center;
    padding: 0.625rem;
    font-weight: 500;
    font-size: 0.875rem;
    border-radius: var(--radius);
    color: var(--gray-600);
    transition: all 0.2s;
}

.login-tab.active {
    background: var(--white);
    color: var(--navy);
    box-shadow: var(--shadow-sm);
}

.login-tab:hover:not(.active) {
    color: var(--navy);
}

/* Footer */
.footer {
    background: var(--navy-dark);
    color: rgba(255,255,255,0.8);
    padding: 3rem 0 1.5rem;
}

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

.footer-brand .logo {
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-brand p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: rgba(255,255,255,0.7);
}

.footer-links h4 {
    color: var(--gold);
    font-size: 1rem;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

.footer-links li {
    margin-bottom: 0.625rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    font-size: 0.9375rem;
}

.footer-contact i {
    color: var(--gold);
    margin-top: 0.25rem;
    width: 20px;
    text-align: center;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255,255,255,0.5);
}

/* Utility */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Tablet */
@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
    
    .nav-desktop {
        display: block;
    }
    
    .btn-portal {
        display: inline-flex;
    }
    
    .hero {
        padding: 10rem 0 6rem;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-visual {
        display: block;
        text-align: center;
    }
    
    .hero-visual-inner {
        background: rgba(255,255,255,0.05);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: var(--radius-lg);
        padding: 3rem 2rem;
        backdrop-filter: blur(10px);
    }
    
    .hero-visual-inner i {
        font-size: 5rem;
        color: var(--gold);
        opacity: 0.8;
    }
    
    .process-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr 2fr;
    }
    
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 2fr;
    }
}

@media (min-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
}
