/* ===================================
   DHALAPATHY ENTERPRISES CSS
   =================================== */

:root {
    --primary-color: #0056b3;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --brand-color: #0084ff;
    --dark-bg: #0a1f3d;
    --light-bg: #e8f4f8;
    --blue-gradient-1: linear-gradient(135deg, #0056b3 0%, #0084ff 100%);
    --blue-gradient-2: linear-gradient(135deg, #0084ff 0%, #00b4d8 100%);
    --blue-gradient-dark: linear-gradient(135deg, #001f4d 0%, #003d7a 100%);
}

/* ===================================
   GENERAL STYLES
   =================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #0056b3 0%, #0084ff 50%, #00b4d8 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #212529;
}

a {
    text-decoration: none;
    transition: all 0.3s ease;
}

/* ===================================
   NAVIGATION BAR
   =================================== */

.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: linear-gradient(90deg, #0a1f3d 0%, #0056b3 100%) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.brand-color {
    color: var(--brand-color) !important;
}

.nav-link {
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-color) !important;
}

/* ===================================
   HERO SECTION
   =================================== */

.hero-section {
    background: linear-gradient(135deg, #0056b3 0%, #0084ff 50%, #00b4d8 100%);
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 84, 179, 0.3);
}

.hero-section::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -50px;
    right: -50px;
}

.hero-section::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -30px;
    left: -30px;
}

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

.hero-section h1 {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
    animation: slideInDown 0.8s ease;
}

.hero-section p {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: slideInUp 0.8s ease;
}

/* ===================================
   PAGE HEADER
   =================================== */

.page-header {
    background: linear-gradient(135deg, #0056b3 0%, #0084ff 50%, #00b4d8 100%);
    padding: 60px 0 !important;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0, 84, 179, 0.2);
}

.page-header h1,
.page-header p {
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===================================
   SECTION TITLES
   =================================== */

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--brand-color);
    border-radius: 2px;
}

/* ===================================
   ABOUT SECTION
   =================================== */

.about-section {
    background: white;
    border-radius: 15px;
    margin: 30px auto;
    box-shadow: 0 10px 40px rgba(0, 84, 179, 0.2);
}

.about-section h4 {
    color: var(--brand-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.about-section p {
    color: #555;
    margin-bottom: 15px;
}

.about-section ul li {
    padding: 8px 0;
    color: #666;
    font-weight: 500;
}

/* ===================================
   RATING SECTION
   =================================== */

.rating-section {
    background: rgba(0, 132, 255, 0.1);
    backdrop-filter: blur(10px);
}

.rating-card {
    border: none;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #e8f4f8 100%);
    border: 2px solid var(--brand-color);
}

.rating-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.rating-stars {
    font-size: 2.5rem;
    color: var(--warning-color);
    letter-spacing: 5px;
}

.star {
    display: inline-block;
    transition: transform 0.3s ease;
}

.star:hover {
    transform: scale(1.2) rotate(15deg);
}

.rating-text {
    font-size: 1.8rem;
    color: var(--brand-color);
    font-weight: 700;
}

/* ===================================
   BRANCHES SECTION
   =================================== */

.branches-preview {
    background: white;
    border-radius: 15px;
    margin: 30px auto;
    box-shadow: 0 10px 40px rgba(0, 84, 179, 0.2);
}

.branch-card {
    border: none;
    border-radius: 12px;
    border-left: 5px solid var(--brand-color);
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #ffffff 0%, #e8f4f8 100%);
}

.branch-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    border-left-color: var(--primary-color);
}

.branch-card .card-title {
    color: var(--brand-color);
    font-weight: 600;
}

/* ===================================
   BRANCHES PAGE
   =================================== */

.branches-section {
    background: white;
    border-radius: 15px;
    margin: 30px auto;
    box-shadow: 0 10px 40px rgba(0, 84, 179, 0.2);
}

.branches-section h2 {
    color: var(--brand-color);
    margin-bottom: 20px;
}

.branch-details {
    text-align: left;
}

.branch-placeholder {
    background: #f0f0f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* ===================================
   OWNER SECTION
   =================================== */

.owner-section {
    background: white;
    border-radius: 15px;
    margin: 30px auto;
    box-shadow: 0 10px 40px rgba(0, 84, 179, 0.2);
}

.owner-photo {
    text-align: center;
}

.photo-container {
    display: inline-block;
    position: relative;
}

.owner-image {
    max-width: 100%;
    height: auto;
    border: 8px solid var(--brand-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.owner-image:hover {
    transform: scale(1.02);
}

.owner-info h2 {
    color: var(--brand-color);
    font-size: 2rem;
    margin-bottom: 10px;
}

.owner-info .fs-5 {
    color: var(--secondary-color);
}

.owner-details,
.rating-box,
.achievements,
.owner-message {
    text-align: left;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.owner-details h4,
.rating-box h5,
.achievements h5,
.owner-message h5 {
    color: var(--brand-color);
    font-weight: 600;
}

.review-item {
    padding: 10px;
    border-left: 4px solid var(--brand-color);
    padding-left: 15px;
}

.achievements .text-success {
    color: var(--success-color) !important;
}

.achievements h3 {
    color: var(--success-color);
    font-weight: 700;
}

/* ===================================
   CONTACT SECTION
   =================================== */

.contact-section {
    background: white;
    border-radius: 15px;
    margin: 30px auto;
    box-shadow: 0 10px 40px rgba(0, 84, 179, 0.2);
}

.contact-card {
    background: linear-gradient(135deg, #ffffff 0%, #e8f4f8 100%);
    border-radius: 12px;
    border: 2px solid var(--brand-color);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

.contact-icon {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.contact-form {
    background: linear-gradient(135deg, #e8f4f8 0%, #d0e8f2 100%);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #0084ff;
}

.contact-form .form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.contact-form .form-control {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

.location-card {
    background: linear-gradient(135deg, #e8f4f8 0%, #d0e8f2 100%);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid #0084ff;
}

.location-card:hover {
    background: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1) !important;
}

.location-card h5 {
    color: var(--brand-color);
    margin-bottom: 10px;
}

/* ===================================
   CTA SECTION
   =================================== */

.cta-section {
    background: linear-gradient(135deg, #003d7a 0%, #0056b3 100%);
    padding: 60px 0 !important;
    color: white;
    border-radius: 15px;
    margin: 30px auto;
    box-shadow: 0 10px 40px rgba(0, 84, 179, 0.3);
}

.cta-section h2 {
    color: white;
    margin-bottom: 20px;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.95);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: linear-gradient(135deg, #0a1f3d 0%, #001f4d 100%);
    color: #fff;
    padding: 40px 0 20px 0 !important;
    margin-top: 60px;
    box-shadow: 0 -5px 20px rgba(0, 84, 179, 0.2);
}

.footer h5 {
    color: var(--brand-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.footer p {
    color: #bbb;
    margin-bottom: 10px;
}

.footer-link {
    color: #bbb;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--brand-color);
}

.social-links a {
    display: inline-block;
    margin-right: 15px;
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
    border-radius: 8px;
    font-weight: 600;
    padding: 10px 25px;
    transition: all 0.3s ease;
    border: none;
}

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

.btn-primary:hover {
    background: #0b5cda;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

.btn-success {
    background: #25D366;
    color: white;
}

.btn-success:hover {
    background: #1fb555;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
}

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

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

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: #333;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

@media (max-width: 768px) {
    .hero-section {
        height: 400px;
    }

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

    .hero-section p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .owner-image {
        max-width: 100%;
    }

    .contact-form {
        padding: 20px;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.95rem;
        min-height: 44px;
        min-width: 44px;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 1rem;
        min-height: 50px;
    }

    .footer {
        text-align: center;
    }

    .footer .social-links {
        margin-top: 15px;
    }

    /* Mobile optimizations */
    .nav-link {
        padding: 12px 10px !important;
    }

    .card {
        margin-bottom: 15px;
    }

    .row {
        margin-bottom: 20px;
    }

    /* Touch-friendly contact cards */
    .contact-card {
        padding: 25px 15px;
    }

    /* Better form spacing */
    .form-control, .form-select {
        padding: 12px 15px;
        font-size: 16px;
        min-height: 44px;
    }

    .form-label {
        font-size: 1rem;
        margin-bottom: 10px;
    }
}

@media (max-width: 576px) {
    html, body {
        font-size: 15px;
    }

    .hero-section {
        height: 280px;
    }

    .hero-section h1 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .hero-section p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .page-header {
        padding: 40px 0 !important;
    }

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

    .section-title {
        font-size: 1.3rem;
    }

    .rating-stars {
        font-size: 1.8rem;
        letter-spacing: 3px;
    }

    .branches-section .row {
        flex-direction: column;
    }

    .branches-section .order-md-2 {
        order: 0 !important;
    }

    .branch-details {
        margin-top: 20px;
    }

    /* Extra small mobile optimizations */
    .btn {
        padding: 12px 20px;
        font-size: 0.9rem;
        width: 100%;
        margin-bottom: 10px;
    }

    .btn-lg {
        padding: 14px 20px;
        font-size: 1rem;
        width: 100%;
    }

    .btn-group, .button-group {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    /* Mobile form improvements */
    .form-control, .form-select {
        padding: 12px 12px;
        font-size: 16px;
        min-height: 44px;
        border-radius: 8px;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }

    .form-control:focus, .form-select:focus {
        border-color: var(--brand-color);
        outline: none;
    }

    input[type="tel"] {
        font-size: 16px;
    }

    textarea {
        resize: vertical;
        font-size: 16px;
    }

    /* Mobile card padding */
    .card {
        margin-bottom: 15px;
    }

    .card-body {
        padding: 15px;
    }

    .contact-card, .branch-card, .rating-card {
        padding: 20px 15px;
    }

    /* Better touch targets */
    a, button {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Navigation improvements */
    .navbar-brand {
        font-size: 1.2rem;
    }

    .nav-link {
        padding: 12px 0 !important;
        font-size: 1rem;
    }

    /* Contact section mobile */
    .contact-card {
        margin-bottom: 20px;
    }

    /* Location cards full width */
    .location-card {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Reduce padding on containers */
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    section {
        padding: 30px 0 !important;
    }

    /* Hero buttons full width */
    .hero-section .btn {
        display: block;
        width: 100%;
        margin: 10px 0;
    }

    /* Owner section mobile */
    .owner-info h2 {
        font-size: 1.5rem;
    }

    .review-item {
        font-size: 0.9rem;
        padding: 8px;
        padding-left: 12px;
    }

    /* Tables mobile friendly */
    table {
        font-size: 0.9rem;
    }

    td, th {
        padding: 8px 6px;
    }

    /* Disable zoom on inputs (iOS) */
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* ===================================
   ANIMATIONS
   =================================== */

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   SECTION CONTAINERS
   =================================== */

section {
    padding: 50px 0 !important;
}

.container {
    max-width: 1200px;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.bg-opacity-10 {
    opacity: 0.1;
}

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.rounded-3 {
    border-radius: 12px;
}

.text-start {
    text-align: left;
}

.text-center {
    text-align: center;
}

.d-none {
    display: none;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

/* ===================================
   BADGE STYLES
   =================================== */

.badge {
    padding: 6px 12px;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 20px;
}

.badge.bg-success {
    background: #198754 !important;
}

.badge.bg-info {
    background: #0dcaf0 !important;
}

.badge.bg-warning {
    background: #ffc107 !important;
    color: #333;
}
